diff options
Diffstat (limited to '')
-rw-r--r-- | src/OSSupport/AtomicUniquePtr.h | 20 | ||||
-rw-r--r-- | src/OSSupport/NetworkSingleton.cpp | 2 | ||||
-rw-r--r-- | src/OSSupport/NetworkSingleton.h | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/OSSupport/AtomicUniquePtr.h b/src/OSSupport/AtomicUniquePtr.h index 5b18763d3..92debbac6 100644 --- a/src/OSSupport/AtomicUniquePtr.h +++ b/src/OSSupport/AtomicUniquePtr.h @@ -11,34 +11,34 @@ public: static_assert(!std::is_array<T>::value, "cAtomicUniquePtr does not support arrays"); DISALLOW_COPY_AND_ASSIGN(cAtomicUniquePtr); - cAtomicUniquePtr() NOEXCEPT: + cAtomicUniquePtr() noexcept: m_Ptr(nullptr) { } - cAtomicUniquePtr(std::unique_ptr<T> a_Ptr) NOEXCEPT: + cAtomicUniquePtr(std::unique_ptr<T> a_Ptr) noexcept: m_Ptr(a_Ptr.release()) { } - cAtomicUniquePtr & operator = (std::unique_ptr<T> a_Ptr) NOEXCEPT + cAtomicUniquePtr & operator = (std::unique_ptr<T> a_Ptr) noexcept { store(std::move(a_Ptr)); return *this; } - ~cAtomicUniquePtr() NOEXCEPT + ~cAtomicUniquePtr() noexcept { delete load(); } - operator T * () const NOEXCEPT + operator T * () const noexcept { return load(); } - bool compare_exchange_weak(T *& a_Expected, std::unique_ptr<T> && a_Desired, std::memory_order a_Order = std::memory_order_seq_cst) NOEXCEPT + bool compare_exchange_weak(T *& a_Expected, std::unique_ptr<T> && a_Desired, std::memory_order a_Order = std::memory_order_seq_cst) noexcept { bool DidExchange = m_Ptr.compare_exchange_weak(a_Expected, a_Desired.get(), a_Order); if (DidExchange) @@ -49,7 +49,7 @@ public: return DidExchange; } - bool compare_exchange_strong(T *& a_Expected, std::unique_ptr<T> && a_Desired, std::memory_order a_Order = std::memory_order_seq_cst) NOEXCEPT + bool compare_exchange_strong(T *& a_Expected, std::unique_ptr<T> && a_Desired, std::memory_order a_Order = std::memory_order_seq_cst) noexcept { bool DidExchange = m_Ptr.compare_exchange_strong(a_Expected, a_Desired.get(), a_Order); if (DidExchange) @@ -60,17 +60,17 @@ public: return DidExchange; } - std::unique_ptr<T> exchange(std::unique_ptr<T> a_Ptr, std::memory_order a_Order = std::memory_order_seq_cst) NOEXCEPT + std::unique_ptr<T> exchange(std::unique_ptr<T> a_Ptr, std::memory_order a_Order = std::memory_order_seq_cst) noexcept { return std::unique_ptr<T>{ m_Ptr.exchange(a_Ptr.release(), a_Order) }; } - T * load(std::memory_order a_Order = std::memory_order_seq_cst) const NOEXCEPT + T * load(std::memory_order a_Order = std::memory_order_seq_cst) const noexcept { return m_Ptr.load(a_Order); } - void store(std::unique_ptr<T> a_Ptr, std::memory_order a_Order = std::memory_order_seq_cst) NOEXCEPT + void store(std::unique_ptr<T> a_Ptr, std::memory_order a_Order = std::memory_order_seq_cst) noexcept { // Store new value and delete old value delete m_Ptr.exchange(a_Ptr.release(), a_Order); diff --git a/src/OSSupport/NetworkSingleton.cpp b/src/OSSupport/NetworkSingleton.cpp index 046768c14..0d8ba31e6 100644 --- a/src/OSSupport/NetworkSingleton.cpp +++ b/src/OSSupport/NetworkSingleton.cpp @@ -24,7 +24,7 @@ cNetworkSingleton::cNetworkSingleton() : -cNetworkSingleton::~cNetworkSingleton() CAN_THROW +cNetworkSingleton::~cNetworkSingleton() noexcept(false) { // Check that Terminate has been called already: ASSERT(m_HasTerminated); diff --git a/src/OSSupport/NetworkSingleton.h b/src/OSSupport/NetworkSingleton.h index 5f3c11720..4bcd58745 100644 --- a/src/OSSupport/NetworkSingleton.h +++ b/src/OSSupport/NetworkSingleton.h @@ -39,7 +39,7 @@ class cNetworkSingleton { public: cNetworkSingleton(); - ~cNetworkSingleton() CAN_THROW; + ~cNetworkSingleton() noexcept(false); /** Returns the singleton instance of this class */ static cNetworkSingleton & Get(void); |