refs #624 Remove noexcept from destructors, which are implicitly noexcept.

This commit is contained in:
Mathew Sutcliffe
2016-03-19 21:07:56 +00:00
parent c26a6fef8b
commit b33781717e
6 changed files with 8 additions and 8 deletions

View File

@@ -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");
}

View File

@@ -41,7 +41,7 @@ namespace BlackMisc
const CStatusMessage &status() const { return m_payload; }
//! Destructor.
~CStatusException() Q_DECL_NOEXCEPT {}
~CStatusException() {}
private:
const CStatusMessage m_payload;

View File

@@ -365,7 +365,7 @@ namespace BlackMisc
return page;
}
CValueCache::BatchGuard::~BatchGuard() Q_DECL_NOEXCEPT
CValueCache::BatchGuard::~BatchGuard()
{
if (m_page)
{

View File

@@ -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;

View File

@@ -86,7 +86,7 @@ namespace BlackMisc
const QString &operationName() const { return m_operationName; }
~CVariantException() Q_DECL_NOEXCEPT {}
~CVariantException() {}
private:
QString m_operationName;

View File

@@ -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();