C++: Use soft asserts instead of assert()

Some qmake versions ignore "DEFINES += NDEBUG" on Windows.

Change-Id: Ibdf3b1036c2331dcef61dcd278463c02754044d2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-05-13 10:20:00 +02:00
parent 9fa9c227db
commit c426b71334
11 changed files with 113 additions and 53 deletions

View File

@@ -19,8 +19,10 @@
// THE SOFTWARE.
#include "MemoryPool.h"
#include "cppassert.h"
#include <cstring>
#include <cassert>
using namespace CPlusPlus;
@@ -52,7 +54,7 @@ void MemoryPool::reset()
void *MemoryPool::allocate_helper(size_t size)
{
assert(size < BLOCK_SIZE);
CPP_CHECK(size < BLOCK_SIZE);
if (++_blockCount == _allocatedBlocks) {
if (! _allocatedBlocks)