diff options
| author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-04-02 10:54:54 +0200 |
|---|---|---|
| committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-04-03 13:49:45 +0000 |
| commit | a1e62e7ba14b00ac7c361936a18e7bc42bf1286d (patch) | |
| tree | 50f5188dbc6092aca660eec970d71fe5ce1706ae /src/corelib/thread/qmutex.cpp | |
| parent | 6c761a0db11b7a2b0104dbf46607ca396ae7ee2d (diff) | |
Replace Q_DECL_NOEXCEPT with noexcept in corelib
In preparation of Qt6 move away from pre-C++11 macros.
Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qmutex.cpp')
| -rw-r--r-- | src/corelib/thread/qmutex.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index 3881ac017e5..4f55e50fe57 100644 --- a/src/corelib/thread/qmutex.cpp +++ b/src/corelib/thread/qmutex.cpp @@ -82,7 +82,7 @@ public: QMutex mutex; bool lock(int timeout) QT_MUTEX_LOCK_NOEXCEPT; - void unlock() Q_DECL_NOTHROW; + void unlock() noexcept; }; /* @@ -329,7 +329,7 @@ bool QMutex::tryLock(int timeout) QT_MUTEX_LOCK_NOEXCEPT \sa lock() */ -void QMutex::unlock() Q_DECL_NOTHROW +void QMutex::unlock() noexcept { QMutexData *current; if (fastTryUnlock(current)) @@ -348,7 +348,7 @@ void QMutex::unlock() Q_DECL_NOTHROW Returns \c true if the mutex is recursive. */ -bool QBasicMutex::isRecursive() Q_DECL_NOTHROW +bool QBasicMutex::isRecursive() noexcept { return QT_PREPEND_NAMESPACE(isRecursive)(d_ptr.loadAcquire()); } @@ -358,7 +358,7 @@ bool QBasicMutex::isRecursive() Q_DECL_NOTHROW Returns \c true if the mutex is recursive. */ -bool QBasicMutex::isRecursive() const Q_DECL_NOTHROW +bool QBasicMutex::isRecursive() const noexcept { return QT_PREPEND_NAMESPACE(isRecursive)(d_ptr.loadAcquire()); } @@ -600,7 +600,7 @@ bool QBasicMutex::lockInternal(int timeout) QT_MUTEX_LOCK_NOEXCEPT /*! \internal */ -void QBasicMutex::unlockInternal() Q_DECL_NOTHROW +void QBasicMutex::unlockInternal() noexcept { QMutexData *copy = d_ptr.loadAcquire(); Q_ASSERT(copy); //we must be locked @@ -675,7 +675,7 @@ void QMutexPrivate::release() } // atomically subtract "value" to the waiters, and remove the QMutexPrivate::BigNumber flag -void QMutexPrivate::derefWaiters(int value) Q_DECL_NOTHROW +void QMutexPrivate::derefWaiters(int value) noexcept { int old_waiters; int new_waiters; @@ -716,7 +716,7 @@ inline bool QRecursiveMutexPrivate::lock(int timeout) QT_MUTEX_LOCK_NOEXCEPT /*! \internal */ -inline void QRecursiveMutexPrivate::unlock() Q_DECL_NOTHROW +inline void QRecursiveMutexPrivate::unlock() noexcept { if (count > 0) { count--; |
