diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-03-18 09:20:45 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-19 08:14:56 +0100 |
commit | 3b2e7bf03b656b38ba7b24acf7ed38de555635f1 (patch) | |
tree | 0a7c9ae7ef73f1fb7d186e4470330b1668477604 /src/qml/jsruntime/qv4executableallocator.cpp | |
parent | 44ca5f1be03420978cc8d5468c4c40dcd5174a06 (diff) |
Use Q_ASSERT instead of assert
Change-Id: I6185b59a7dfd6977ce82581ab4385e07d78f13f6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4executableallocator.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4executableallocator.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4executableallocator.cpp b/src/qml/jsruntime/qv4executableallocator.cpp index 9b31524614..5c3419fd79 100644 --- a/src/qml/jsruntime/qv4executableallocator.cpp +++ b/src/qml/jsruntime/qv4executableallocator.cpp @@ -41,7 +41,6 @@ #include "qv4executableallocator_p.h" -#include <assert.h> #include <wtf/StdLibExtras.h> #include <wtf/PageAllocation.h> @@ -81,7 +80,7 @@ ExecutableAllocator::Allocation *ExecutableAllocator::Allocation::split(size_t d bool ExecutableAllocator::Allocation::mergeNext(ExecutableAllocator *allocator) { - assert(free); + Q_ASSERT(free); if (!next || !next->free) return false; @@ -101,7 +100,7 @@ bool ExecutableAllocator::Allocation::mergeNext(ExecutableAllocator *allocator) bool ExecutableAllocator::Allocation::mergePrevious(ExecutableAllocator *allocator) { - assert(free); + Q_ASSERT(free); if (!prev || !prev->free) return false; @@ -185,8 +184,8 @@ ExecutableAllocator::Allocation *ExecutableAllocator::allocate(size_t size) chunk->firstAllocation = allocation; } - assert(allocation); - assert(allocation->free); + Q_ASSERT(allocation); + Q_ASSERT(allocation->free); allocation->free = false; @@ -204,16 +203,16 @@ void ExecutableAllocator::free(Allocation *allocation) { QMutexLocker locker(&mutex); - assert(allocation); + Q_ASSERT(allocation); allocation->free = true; QMap<quintptr, ChunkOfPages*>::Iterator it = chunks.lowerBound(allocation->addr); if (it != chunks.begin()) --it; - assert(it != chunks.end()); + Q_ASSERT(it != chunks.end()); ChunkOfPages *chunk = *it; - assert(chunk->contains(allocation)); + Q_ASSERT(chunk->contains(allocation)); bool merged = allocation->mergeNext(this); merged |= allocation->mergePrevious(this); |