mirror of https://github.com/PCSX2/pcsx2.git
common: remove throw specifier on destructor
By default in C++11 destructors are noexcept. Besides throw is deprecated
This commit is contained in:
parent
b15ab1b1cf
commit
b951e24024
|
@ -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;
|
||||
|
|
|
@ -153,7 +153,7 @@ public:
|
|||
m_boolme = &boolme;
|
||||
}
|
||||
|
||||
~ScopedBool() throw()
|
||||
~ScopedBool()
|
||||
{
|
||||
*m_boolme = false;
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -67,7 +67,7 @@ class EventListener_PageFault : public IEventListener_PageFault
|
|||
{
|
||||
public:
|
||||
EventListener_PageFault();
|
||||
virtual ~EventListener_PageFault() throw();
|
||||
virtual ~EventListener_PageFault();
|
||||
};
|
||||
|
||||
template <typename TypeToDispatchTo>
|
||||
|
@ -157,7 +157,7 @@ protected:
|
|||
|
||||
public:
|
||||
VirtualMemoryReserve(const wxString &name = wxEmptyString, size_t size = 0);
|
||||
virtual ~VirtualMemoryReserve() throw()
|
||||
virtual ~VirtualMemoryReserve()
|
||||
{
|
||||
Release();
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ protected:
|
|||
|
||||
|
||||
public:
|
||||
virtual ~pxThread() throw();
|
||||
virtual ~pxThread();
|
||||
pxThread(const wxString &name = L"pxThread");
|
||||
|
||||
pthread_t GetId() const { return m_thread; }
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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<T> *Clone() const;
|
||||
|
@ -203,7 +203,7 @@ protected:
|
|||
public:
|
||||
using _parent::operator[];
|
||||
|
||||
virtual ~SafeAlignedArray() throw();
|
||||
virtual ~SafeAlignedArray();
|
||||
|
||||
explicit SafeAlignedArray(const wxChar *name = L"Unnamed")
|
||||
: SafeArray<T>::SafeArray(name)
|
||||
|
|
|
@ -55,7 +55,7 @@ T *SafeArray<T>::_virtual_realloc(int newsize)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
SafeArray<T>::~SafeArray() throw()
|
||||
SafeArray<T>::~SafeArray()
|
||||
{
|
||||
safe_free(m_ptr);
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ T *SafeAlignedArray<T, Alignment>::_virtual_realloc(int newsize)
|
|||
// Maybe useful,maybe not... no harm in attaching it. :D
|
||||
|
||||
template <typename T, uint Alignment>
|
||||
SafeAlignedArray<T, Alignment>::~SafeAlignedArray() throw()
|
||||
SafeAlignedArray<T, Alignment>::~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<T>::_virtual_realloc(int newsize)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
SafeList<T>::~SafeList() throw()
|
||||
SafeList<T>::~SafeList()
|
||||
{
|
||||
safe_free(m_ptr);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
m_ptr = ptr;
|
||||
}
|
||||
|
||||
~ScopedPtrMT() throw() { _Delete_unlocked(); }
|
||||
~ScopedPtrMT() { _Delete_unlocked(); }
|
||||
|
||||
ScopedPtrMT &Reassign(T *ptr = nullptr)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ public:
|
|||
|
||||
pxExceptionEvent(const BaseException &ex);
|
||||
|
||||
virtual ~pxExceptionEvent() throw()
|
||||
virtual ~pxExceptionEvent()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
m_prev = wxLog::EnableLogging(false);
|
||||
}
|
||||
|
||||
virtual ~wxDoNotLogInThisScope() throw()
|
||||
virtual ~wxDoNotLogInThisScope()
|
||||
{
|
||||
wxLog::EnableLogging(m_prev);
|
||||
}
|
||||
|
|
|
@ -772,7 +772,7 @@ protected:
|
|||
|
||||
public:
|
||||
ScopedBusyCursor(BusyCursorType busytype);
|
||||
virtual ~ScopedBusyCursor() throw();
|
||||
virtual ~ScopedBusyCursor();
|
||||
|
||||
static void SetDefault(BusyCursorType busytype);
|
||||
static void SetManualBusyCursor(BusyCursorType busytype);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -30,7 +30,7 @@ Threading::Semaphore::Semaphore()
|
|||
sem_init(&m_sema, false, 0);
|
||||
}
|
||||
|
||||
Threading::Semaphore::~Semaphore() throw()
|
||||
Threading::Semaphore::~Semaphore()
|
||||
{
|
||||
sem_destroy(&m_sema);
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -529,7 +529,7 @@ ScopedBusyCursor::ScopedBusyCursor(BusyCursorType busytype)
|
|||
m_cursorStack.push(curtype);
|
||||
}
|
||||
|
||||
ScopedBusyCursor::~ScopedBusyCursor() throw()
|
||||
ScopedBusyCursor::~ScopedBusyCursor()
|
||||
{
|
||||
if (!pxAssert(wxTheApp != NULL))
|
||||
return;
|
||||
|
|
|
@ -59,7 +59,7 @@ BaseDeletableObject::BaseDeletableObject()
|
|||
m_IsBeingDeleted.store(false, std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
BaseDeletableObject::~BaseDeletableObject() throw()
|
||||
BaseDeletableObject::~BaseDeletableObject()
|
||||
{
|
||||
AffinityAssert_AllowFrom_MainUI();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -34,5 +34,5 @@ protected:
|
|||
|
||||
public:
|
||||
SingleCoreAffinity();
|
||||
virtual ~SingleCoreAffinity() throw();
|
||||
virtual ~SingleCoreAffinity();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue