diff options
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qexception.h | 2 | ||||
-rw-r--r-- | src/corelib/thread/qpromise.h | 2 | ||||
-rw-r--r-- | src/corelib/thread/qsemaphore.h | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/thread/qexception.h b/src/corelib/thread/qexception.h index 1c69287615..4d4d53304e 100644 --- a/src/corelib/thread/qexception.h +++ b/src/corelib/thread/qexception.h @@ -72,7 +72,7 @@ public: QUnhandledException(QUnhandledException &&other) noexcept; QUnhandledException(const QUnhandledException &other) noexcept; - void swap(QUnhandledException &other) noexcept { qSwap(d, other.d); } + void swap(QUnhandledException &other) noexcept { d.swap(other.d); } QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QUnhandledException) QUnhandledException &operator=(const QUnhandledException &other) noexcept; diff --git a/src/corelib/thread/qpromise.h b/src/corelib/thread/qpromise.h index 3cecbd8306..a970f40d12 100644 --- a/src/corelib/thread/qpromise.h +++ b/src/corelib/thread/qpromise.h @@ -106,7 +106,7 @@ public: void swap(QPromise<T> &other) noexcept { - qSwap(this->d, other.d); + d.swap(other.d); } #if defined(Q_CLANG_QDOC) // documentation-only simplified signatures diff --git a/src/corelib/thread/qsemaphore.h b/src/corelib/thread/qsemaphore.h index b57a274104..4e44965918 100644 --- a/src/corelib/thread/qsemaphore.h +++ b/src/corelib/thread/qsemaphore.h @@ -109,8 +109,8 @@ public: void swap(QSemaphoreReleaser &other) noexcept { - qSwap(m_sem, other.m_sem); - qSwap(m_n, other.m_n); + qt_ptr_swap(m_sem, other.m_sem); + std::swap(m_n, other.m_n); } QSemaphore *semaphore() const noexcept |