diff --git a/common/include/Utilities/Console.h b/common/include/Utilities/Console.h index a87f825266..e83b0fab36 100644 --- a/common/include/Utilities/Console.h +++ b/common/include/Utilities/Console.h @@ -189,7 +189,7 @@ public: // Constructor: The specified number of tabs will be appended to the current indentation // setting. The tabs will be unrolled when the object leaves scope or is destroyed. ConsoleIndentScope(int tabs = 1); - virtual ~ConsoleIndentScope() throw(); + virtual ~ConsoleIndentScope(); void EnterScope(); void LeaveScope(); }; @@ -208,7 +208,7 @@ protected: public: ConsoleColorScope(ConsoleColors newcolor); - virtual ~ConsoleColorScope() throw(); + virtual ~ConsoleColorScope(); void EnterScope(); void LeaveScope(); }; @@ -228,7 +228,7 @@ protected: public: ConsoleAttrScope(ConsoleColors newcolor, int indent = 0); - virtual ~ConsoleAttrScope() throw(); + virtual ~ConsoleAttrScope(); }; extern IConsoleWriter Console; diff --git a/common/include/Utilities/Dependencies.h b/common/include/Utilities/Dependencies.h index 1286ad048c..c3044d2ebb 100644 --- a/common/include/Utilities/Dependencies.h +++ b/common/include/Utilities/Dependencies.h @@ -153,7 +153,7 @@ public: m_boolme = &boolme; } - ~ScopedBool() throw() + ~ScopedBool() { *m_boolme = false; } diff --git a/common/include/Utilities/General.h b/common/include/Utilities/General.h index 4e51d56485..31b1f55d3d 100644 --- a/common/include/Utilities/General.h +++ b/common/include/Utilities/General.h @@ -56,7 +56,7 @@ public: ++Counter; } - virtual ~RecursionGuard() throw() + virtual ~RecursionGuard() { --Counter; } @@ -126,7 +126,7 @@ protected: public: BaseDeletableObject(); - virtual ~BaseDeletableObject() throw(); + virtual ~BaseDeletableObject(); void DeleteSelf(); bool IsBeingDeleted() { return !!m_IsBeingDeleted; } diff --git a/common/include/Utilities/PageFaultSource.h b/common/include/Utilities/PageFaultSource.h index 212d804462..7a7e32f848 100644 --- a/common/include/Utilities/PageFaultSource.h +++ b/common/include/Utilities/PageFaultSource.h @@ -67,7 +67,7 @@ class EventListener_PageFault : public IEventListener_PageFault { public: EventListener_PageFault(); - virtual ~EventListener_PageFault() throw(); + virtual ~EventListener_PageFault(); }; template @@ -157,7 +157,7 @@ protected: public: VirtualMemoryReserve(const wxString &name = wxEmptyString, size_t size = 0); - virtual ~VirtualMemoryReserve() throw() + virtual ~VirtualMemoryReserve() { Release(); } diff --git a/common/include/Utilities/PersistentThread.h b/common/include/Utilities/PersistentThread.h index 1617819baa..d281954be3 100644 --- a/common/include/Utilities/PersistentThread.h +++ b/common/include/Utilities/PersistentThread.h @@ -114,7 +114,7 @@ protected: public: - virtual ~pxThread() throw(); + virtual ~pxThread(); pxThread(const wxString &name = L"pxThread"); pthread_t GetId() const { return m_thread; } diff --git a/common/include/Utilities/RwMutex.h b/common/include/Utilities/RwMutex.h index d84813f781..a6789583ee 100644 --- a/common/include/Utilities/RwMutex.h +++ b/common/include/Utilities/RwMutex.h @@ -31,7 +31,7 @@ protected: public: RwMutex(); - virtual ~RwMutex() throw(); + virtual ~RwMutex(); virtual void AcquireRead(); virtual void AcquireWrite(); @@ -58,7 +58,7 @@ public: { } - virtual ~BaseScopedReadWriteLock() throw(); + virtual ~BaseScopedReadWriteLock(); void Release(); bool IsLocked() const { return m_IsLocked; } diff --git a/common/include/Utilities/SafeArray.h b/common/include/Utilities/SafeArray.h index 4251ff7fea..1fbb48f35f 100644 --- a/common/include/Utilities/SafeArray.h +++ b/common/include/Utilities/SafeArray.h @@ -57,7 +57,7 @@ protected: T *_getPtr(uint i) const; public: - virtual ~SafeArray() throw(); + virtual ~SafeArray(); explicit SafeArray(const wxChar *name = L"Unnamed"); explicit SafeArray(int initialSize, const wxChar *name = L"Unnamed"); @@ -137,7 +137,7 @@ protected: T *_getPtr(uint i) const; public: - virtual ~SafeList() throw(); + virtual ~SafeList(); explicit SafeList(const wxChar *name = L"Unnamed"); explicit SafeList(int initialSize, const wxChar *name = L"Unnamed"); virtual SafeList *Clone() const; @@ -203,7 +203,7 @@ protected: public: using _parent::operator[]; - virtual ~SafeAlignedArray() throw(); + virtual ~SafeAlignedArray(); explicit SafeAlignedArray(const wxChar *name = L"Unnamed") : SafeArray::SafeArray(name) diff --git a/common/include/Utilities/SafeArray.inl b/common/include/Utilities/SafeArray.inl index 6d447271ce..dd41f85acd 100644 --- a/common/include/Utilities/SafeArray.inl +++ b/common/include/Utilities/SafeArray.inl @@ -55,7 +55,7 @@ T *SafeArray::_virtual_realloc(int newsize) } template -SafeArray::~SafeArray() throw() +SafeArray::~SafeArray() { safe_free(m_ptr); } @@ -138,7 +138,7 @@ T *SafeAlignedArray::_virtual_realloc(int newsize) // Maybe useful,maybe not... no harm in attaching it. :D template -SafeAlignedArray::~SafeAlignedArray() throw() +SafeAlignedArray::~SafeAlignedArray() { safe_aligned_free(this->m_ptr); // mptr is set to null, so the parent class's destructor won't re-free it. @@ -172,7 +172,7 @@ T *SafeList::_virtual_realloc(int newsize) } template -SafeList::~SafeList() throw() +SafeList::~SafeList() { safe_free(m_ptr); } diff --git a/common/include/Utilities/ScopedAlloc.h b/common/include/Utilities/ScopedAlloc.h index 973882ab5b..83ae216fce 100644 --- a/common/include/Utilities/ScopedAlloc.h +++ b/common/include/Utilities/ScopedAlloc.h @@ -103,7 +103,7 @@ public: m_size = 0; } - virtual ~BaseScopedAlloc() throw() + virtual ~BaseScopedAlloc() { //pxAssert(m_buffer==NULL); } @@ -184,7 +184,7 @@ public: Alloc(size); } - virtual ~ScopedAlloc() throw() + virtual ~ScopedAlloc() { safe_free(this->m_buffer); } @@ -234,7 +234,7 @@ public: Alloc(size); } - virtual ~ScopedAlignedAlloc() throw() + virtual ~ScopedAlignedAlloc() { safe_aligned_free(this->m_buffer); } diff --git a/common/include/Utilities/ScopedPtrMT.h b/common/include/Utilities/ScopedPtrMT.h index 376648bceb..beb010dd8c 100644 --- a/common/include/Utilities/ScopedPtrMT.h +++ b/common/include/Utilities/ScopedPtrMT.h @@ -39,7 +39,7 @@ public: m_ptr = ptr; } - ~ScopedPtrMT() throw() { _Delete_unlocked(); } + ~ScopedPtrMT() { _Delete_unlocked(); } ScopedPtrMT &Reassign(T *ptr = nullptr) { diff --git a/common/include/Utilities/Threading.h b/common/include/Utilities/Threading.h index 8058ba4a3a..44a251b9e8 100644 --- a/common/include/Utilities/Threading.h +++ b/common/include/Utilities/Threading.h @@ -186,7 +186,7 @@ extern void Sleep(int ms); pthread_mutex_t mutex; WaitEvent(); - ~WaitEvent() throw(); + ~WaitEvent(); void Set(); void Wait(); @@ -243,7 +243,7 @@ protected: public: Semaphore(); - virtual ~Semaphore() throw(); + virtual ~Semaphore(); void Reset(); void Post(); @@ -266,7 +266,7 @@ protected: public: Mutex(); - virtual ~Mutex() throw(); + virtual ~Mutex(); virtual bool IsRecursive() const { return false; } void Recreate(); @@ -295,7 +295,7 @@ class MutexRecursive : public Mutex { public: MutexRecursive(); - virtual ~MutexRecursive() throw(); + virtual ~MutexRecursive(); virtual bool IsRecursive() const { return true; } }; @@ -327,7 +327,7 @@ protected: bool m_IsLocked; public: - virtual ~ScopedLock() throw(); + virtual ~ScopedLock(); explicit ScopedLock(const Mutex *locker = NULL); explicit ScopedLock(const Mutex &locker); void AssignAndLock(const Mutex &locker); @@ -377,7 +377,7 @@ public: { } - virtual ~ScopedNonblockingLock() throw() + virtual ~ScopedNonblockingLock() { if (m_IsLocked) m_lock.Release(); @@ -404,7 +404,7 @@ struct ScopedLockBool { m_bool.store(m_lock.IsLocked(), std::memory_order_relaxed); } - virtual ~ScopedLockBool() throw() + virtual ~ScopedLockBool() { m_bool.store(false, std::memory_order_relaxed); } diff --git a/common/include/Utilities/pxEvents.h b/common/include/Utilities/pxEvents.h index 8b7d16ee5a..2307507adc 100644 --- a/common/include/Utilities/pxEvents.h +++ b/common/include/Utilities/pxEvents.h @@ -149,7 +149,7 @@ public: pxExceptionEvent(const BaseException &ex); - virtual ~pxExceptionEvent() throw() + virtual ~pxExceptionEvent() { } diff --git a/common/include/Utilities/wxBaseTools.h b/common/include/Utilities/wxBaseTools.h index 5d65f5b663..2a38f51fce 100644 --- a/common/include/Utilities/wxBaseTools.h +++ b/common/include/Utilities/wxBaseTools.h @@ -55,7 +55,7 @@ public: m_prev = wxLog::EnableLogging(false); } - virtual ~wxDoNotLogInThisScope() throw() + virtual ~wxDoNotLogInThisScope() { wxLog::EnableLogging(m_prev); } diff --git a/common/include/Utilities/wxGuiTools.h b/common/include/Utilities/wxGuiTools.h index b2ac85f947..d286b2a8e2 100644 --- a/common/include/Utilities/wxGuiTools.h +++ b/common/include/Utilities/wxGuiTools.h @@ -772,7 +772,7 @@ protected: public: ScopedBusyCursor(BusyCursorType busytype); - virtual ~ScopedBusyCursor() throw(); + virtual ~ScopedBusyCursor(); static void SetDefault(BusyCursorType busytype); static void SetManualBusyCursor(BusyCursorType busytype); diff --git a/common/src/Utilities/Console.cpp b/common/src/Utilities/Console.cpp index bfa5bf3116..748767481e 100644 --- a/common/src/Utilities/Console.cpp +++ b/common/src/Utilities/Console.cpp @@ -465,7 +465,7 @@ ConsoleColorScope::ConsoleColorScope(ConsoleColors newcolor) EnterScope(); } -ConsoleColorScope::~ConsoleColorScope() throw() +ConsoleColorScope::~ConsoleColorScope() { LeaveScope(); } @@ -491,7 +491,7 @@ ConsoleIndentScope::ConsoleIndentScope(int tabs) EnterScope(); } -ConsoleIndentScope::~ConsoleIndentScope() throw() +ConsoleIndentScope::~ConsoleIndentScope() { try { LeaveScope(); @@ -517,7 +517,7 @@ ConsoleAttrScope::ConsoleAttrScope(ConsoleColors newcolor, int indent) Console.SetColor(newcolor); } -ConsoleAttrScope::~ConsoleAttrScope() throw() +ConsoleAttrScope::~ConsoleAttrScope() { try { Console.SetColor(m_old_color); diff --git a/common/src/Utilities/Darwin/DarwinSemaphore.cpp b/common/src/Utilities/Darwin/DarwinSemaphore.cpp index 9f615f8fa8..7584c944bb 100644 --- a/common/src/Utilities/Darwin/DarwinSemaphore.cpp +++ b/common/src/Utilities/Darwin/DarwinSemaphore.cpp @@ -64,7 +64,7 @@ Threading::Semaphore::Semaphore() __atomic_store_n(&m_counter, 0, __ATOMIC_SEQ_CST); } -Threading::Semaphore::~Semaphore() throw() +Threading::Semaphore::~Semaphore() { MACH_CHECK(semaphore_destroy(mach_task_self(), (semaphore_t)m_sema)); __atomic_store_n(&m_counter, 0, __ATOMIC_SEQ_CST); diff --git a/common/src/Utilities/Mutex.cpp b/common/src/Utilities/Mutex.cpp index 99cf8333be..9f48bc4def 100644 --- a/common/src/Utilities/Mutex.cpp +++ b/common/src/Utilities/Mutex.cpp @@ -114,7 +114,7 @@ void Threading::Mutex::Detach() Console.Error("(Thread Log) Mutex cleanup failed due to possible deadlock."); } -Threading::Mutex::~Mutex() throw() +Threading::Mutex::~Mutex() { try { Mutex::Detach(); @@ -136,7 +136,7 @@ Threading::MutexRecursive::MutexRecursive() Console.Error("(Thread Log) Failed to initialize mutex."); } -Threading::MutexRecursive::~MutexRecursive() throw() +Threading::MutexRecursive::~MutexRecursive() { if (--_attr_refcount == 0) pthread_mutexattr_destroy(&_attr_recursive); @@ -288,7 +288,7 @@ bool Threading::Mutex::WaitWithoutYield(const wxTimeSpan &timeout) // ScopedLock Implementations // -------------------------------------------------------------------------------------- -Threading::ScopedLock::~ScopedLock() throw() +Threading::ScopedLock::~ScopedLock() { if (m_IsLocked && m_lock) m_lock->Release(); diff --git a/common/src/Utilities/RwMutex.cpp b/common/src/Utilities/RwMutex.cpp index 2b191a881e..c5c358ab6d 100644 --- a/common/src/Utilities/RwMutex.cpp +++ b/common/src/Utilities/RwMutex.cpp @@ -24,7 +24,7 @@ Threading::RwMutex::RwMutex() pthread_rwlock_init(&m_rwlock, NULL); } -Threading::RwMutex::~RwMutex() throw() +Threading::RwMutex::~RwMutex() { pthread_rwlock_destroy(&m_rwlock); } @@ -57,7 +57,7 @@ void Threading::RwMutex::Release() // -------------------------------------------------------------------------------------- // // -------------------------------------------------------------------------------------- -Threading::BaseScopedReadWriteLock::~BaseScopedReadWriteLock() throw() +Threading::BaseScopedReadWriteLock::~BaseScopedReadWriteLock() { if (m_IsLocked) m_lock.Release(); diff --git a/common/src/Utilities/Semaphore.cpp b/common/src/Utilities/Semaphore.cpp index 75a95cbc2b..3f5a8fc6ef 100644 --- a/common/src/Utilities/Semaphore.cpp +++ b/common/src/Utilities/Semaphore.cpp @@ -30,7 +30,7 @@ Threading::Semaphore::Semaphore() sem_init(&m_sema, false, 0); } -Threading::Semaphore::~Semaphore() throw() +Threading::Semaphore::~Semaphore() { sem_destroy(&m_sema); } diff --git a/common/src/Utilities/ThreadTools.cpp b/common/src/Utilities/ThreadTools.cpp index 129c4f7acd..649027b828 100644 --- a/common/src/Utilities/ThreadTools.cpp +++ b/common/src/Utilities/ThreadTools.cpp @@ -57,7 +57,7 @@ public: { } - virtual ~StaticMutex() throw() + virtual ~StaticMutex() { m_DeletedFlag = true; } @@ -184,7 +184,7 @@ Threading::pxThread::pxThread(const wxString &name) // // Thread safety: This class must not be deleted from its own thread. That would be // like marrying your sister, and then cheating on her with your daughter. -Threading::pxThread::~pxThread() throw() +Threading::pxThread::~pxThread() { try { pxThreadLog.Write(GetName(), L"Executing default destructor!"); @@ -758,7 +758,7 @@ Threading::WaitEvent::WaitEvent() err = pthread_mutex_init(&mutex, NULL); } -Threading::WaitEvent::~WaitEvent() throw() +Threading::WaitEvent::~WaitEvent() { pthread_cond_destroy( &cond ); pthread_mutex_destroy( &mutex ); diff --git a/common/src/Utilities/VirtualMemory.cpp b/common/src/Utilities/VirtualMemory.cpp index 946ca6e9ca..3fdcb5a43e 100644 --- a/common/src/Utilities/VirtualMemory.cpp +++ b/common/src/Utilities/VirtualMemory.cpp @@ -48,7 +48,7 @@ EventListener_PageFault::EventListener_PageFault() Source_PageFault->Add(*this); } -EventListener_PageFault::~EventListener_PageFault() throw() +EventListener_PageFault::~EventListener_PageFault() { if (Source_PageFault) Source_PageFault->Remove(*this); diff --git a/common/src/Utilities/wxGuiTools.cpp b/common/src/Utilities/wxGuiTools.cpp index b77c1df042..4b55363e75 100644 --- a/common/src/Utilities/wxGuiTools.cpp +++ b/common/src/Utilities/wxGuiTools.cpp @@ -529,7 +529,7 @@ ScopedBusyCursor::ScopedBusyCursor(BusyCursorType busytype) m_cursorStack.push(curtype); } -ScopedBusyCursor::~ScopedBusyCursor() throw() +ScopedBusyCursor::~ScopedBusyCursor() { if (!pxAssert(wxTheApp != NULL)) return; diff --git a/common/src/Utilities/wxHelpers.cpp b/common/src/Utilities/wxHelpers.cpp index a095dd7d24..3a6ba54324 100644 --- a/common/src/Utilities/wxHelpers.cpp +++ b/common/src/Utilities/wxHelpers.cpp @@ -59,7 +59,7 @@ BaseDeletableObject::BaseDeletableObject() m_IsBeingDeleted.store(false, std::memory_order_relaxed); } -BaseDeletableObject::~BaseDeletableObject() throw() +BaseDeletableObject::~BaseDeletableObject() { AffinityAssert_AllowFrom_MainUI(); } diff --git a/common/src/x86emitter/LnxCpuDetect.cpp b/common/src/x86emitter/LnxCpuDetect.cpp index 41de22c563..b4ec113c29 100644 --- a/common/src/x86emitter/LnxCpuDetect.cpp +++ b/common/src/x86emitter/LnxCpuDetect.cpp @@ -30,4 +30,4 @@ void x86capabilities::CountLogicalCores() // Not implemented yet for linux (see cpudetect_internal.h for details) SingleCoreAffinity::SingleCoreAffinity() = default; -SingleCoreAffinity::~SingleCoreAffinity() throw() = default; +SingleCoreAffinity::~SingleCoreAffinity() = default; diff --git a/common/src/x86emitter/WinCpuDetect.cpp b/common/src/x86emitter/WinCpuDetect.cpp index b92a491cb6..6f639e3789 100644 --- a/common/src/x86emitter/WinCpuDetect.cpp +++ b/common/src/x86emitter/WinCpuDetect.cpp @@ -75,7 +75,7 @@ SingleCoreAffinity::SingleCoreAffinity() // the thread during the cpuSpeed test instead, causing totally wacky results. }; -SingleCoreAffinity::~SingleCoreAffinity() throw() +SingleCoreAffinity::~SingleCoreAffinity() { if (s_oldmask != ERROR_INVALID_PARAMETER) SetThreadAffinityMask(s_threadId, s_oldmask); diff --git a/common/src/x86emitter/cpudetect_internal.h b/common/src/x86emitter/cpudetect_internal.h index 90b2fc0faf..a1c9f61038 100644 --- a/common/src/x86emitter/cpudetect_internal.h +++ b/common/src/x86emitter/cpudetect_internal.h @@ -34,5 +34,5 @@ protected: public: SingleCoreAffinity(); - virtual ~SingleCoreAffinity() throw(); + virtual ~SingleCoreAffinity(); };