From 768bc406f7bef67d9803d96c3974e9723cec477d Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Mon, 31 Oct 2011 12:35:12 +0100 Subject: [PATCH] Use QAtomicInt::store() instead of operator=(int) ... since the latter is now deprecated and will be removed. Change-Id: I456c1bf93ebf119c028bc4a63f1f8a31f069b83b Reviewed-by: Friedemann Kleint --- src/corelib/thread/qmutex.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index 6ba0a8ca35..df36120d88 100644 --- a/src/corelib/thread/qmutex.cpp +++ b/src/corelib/thread/qmutex.cpp @@ -388,7 +388,7 @@ bool QBasicMutex::lockInternal(int timeout) if (d_ptr.testAndSetAcquire(d, dummyLocked())) { // Mutex aquired Q_ASSERT(d->waiters.load() == -QMutexPrivate::BigNumber || d->waiters.load() == 0); - d->waiters = 0; + d->waiters.store(0); d->deref(); return true; } else { @@ -491,7 +491,7 @@ QMutexPrivate *QMutexPrivate::allocate() Q_ASSERT(!d->recursive); Q_ASSERT(!d->possiblyUnlocked.load()); Q_ASSERT(d->waiters.load() == 0); - d->refCount = 1; + d->refCount.store(1); return d; }