mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
refs #624 Remove noexcept from destructors, which are implicitly noexcept.
This commit is contained in:
@@ -142,7 +142,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
//! Destructor. The original object will be overwritten by the new one stored in the writer.
|
||||
~LockFreeUniqueWriter() Q_DECL_NOEXCEPT
|
||||
~LockFreeUniqueWriter()
|
||||
{
|
||||
if (m_ptr.use_count() == 0) { return; } // *this has been moved from
|
||||
bool success = Private::atomic_compare_exchange_strong(m_now, &m_old, std::shared_ptr<const T>(m_ptr));
|
||||
@@ -203,7 +203,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
//! Destructor. The writer's changes must be committed before this is called.
|
||||
~LockFreeSharedWriter() Q_DECL_NOEXCEPT
|
||||
~LockFreeSharedWriter()
|
||||
{
|
||||
Q_ASSERT_X(m_ptr.use_count() == 0, qPrintable(name()), "SharedWriter destroyed without committing changes");
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace BlackMisc
|
||||
const CStatusMessage &status() const { return m_payload; }
|
||||
|
||||
//! Destructor.
|
||||
~CStatusException() Q_DECL_NOEXCEPT {}
|
||||
~CStatusException() {}
|
||||
|
||||
private:
|
||||
const CStatusMessage m_payload;
|
||||
|
||||
@@ -365,7 +365,7 @@ namespace BlackMisc
|
||||
return page;
|
||||
}
|
||||
|
||||
CValueCache::BatchGuard::~BatchGuard() Q_DECL_NOEXCEPT
|
||||
CValueCache::BatchGuard::~BatchGuard()
|
||||
{
|
||||
if (m_page)
|
||||
{
|
||||
|
||||
@@ -345,7 +345,7 @@ namespace BlackMisc
|
||||
{
|
||||
public:
|
||||
//! Destructor. Applies deferred changes.
|
||||
~BatchGuard() Q_DECL_NOEXCEPT;
|
||||
~BatchGuard();
|
||||
|
||||
//! Deleted copy constructor. Class is move-only.
|
||||
BatchGuard(const BatchGuard &) = delete;
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace BlackMisc
|
||||
|
||||
const QString &operationName() const { return m_operationName; }
|
||||
|
||||
~CVariantException() Q_DECL_NOEXCEPT {}
|
||||
~CVariantException() {}
|
||||
|
||||
private:
|
||||
QString m_operationName;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace BlackMisc
|
||||
Q_OBJECT
|
||||
public:
|
||||
CSingleShotController(QObject *parent) : QObject(parent), m_strongRef(QSharedPointer<int>::create(0)) {}
|
||||
~CSingleShotController() Q_DECL_NOEXCEPT { auto wr = weakRef(); m_strongRef.clear(); waitForNull(wr); }
|
||||
~CSingleShotController() { auto wr = weakRef(); m_strongRef.clear(); waitForNull(wr); }
|
||||
QWeakPointer<int> weakRef() const { return m_strongRef.toWeakRef(); }
|
||||
private:
|
||||
static void waitForNull(QWeakPointer<int> wp) { while (wp) { QThread::msleep(10); } }
|
||||
@@ -86,7 +86,7 @@ namespace BlackMisc
|
||||
CRegularThread(QObject *parent = nullptr) : QThread(parent) {}
|
||||
|
||||
//! Destructor
|
||||
~CRegularThread() Q_DECL_NOEXCEPT
|
||||
~CRegularThread()
|
||||
{
|
||||
quit();
|
||||
wait();
|
||||
|
||||
Reference in New Issue
Block a user