diff options
Diffstat (limited to 'src/corelib/tools/qfreelist_p.h')
-rw-r--r-- | src/corelib/tools/qfreelist_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qfreelist_p.h b/src/corelib/tools/qfreelist_p.h index 2f98cf5cc1..d72d6e1b4b 100644 --- a/src/corelib/tools/qfreelist_p.h +++ b/src/corelib/tools/qfreelist_p.h @@ -187,7 +187,7 @@ class QFreeList QAtomicInt _next; // QFreeList is not copyable - Q_DISABLE_COPY(QFreeList) + Q_DISABLE_COPY_MOVE(QFreeList) public: Q_DECL_CONSTEXPR inline QFreeList(); @@ -249,11 +249,11 @@ inline int QFreeList<T, ConstantsType>::next() if (!v) { v = allocate((id & ConstantsType::IndexMask) - at, ConstantsType::Sizes[block]); - if (!_v[block].testAndSetRelease(0, v)) { + if (!_v[block].testAndSetRelease(nullptr, v)) { // race with another thread lost delete [] v; v = _v[block].loadAcquire(); - Q_ASSERT(v != 0); + Q_ASSERT(v != nullptr); } } |