common: use = default instead of trivial destructor

Strangely clang-tidy didn't report them.

Commit was done with a sed to it need careful review.
This commit is contained in:
Gregory Hainaut 2017-05-06 14:53:02 +02:00
parent b951e24024
commit 1a9a65d4d0
15 changed files with 33 additions and 33 deletions

View File

@ -49,7 +49,7 @@ public:
m_cache_valid = false;
}
virtual ~EventSource() throw() {}
virtual ~EventSource() = default;
virtual ListenerIterator Add(ListenerType &listener);
virtual void Remove(ListenerType &listener);
@ -89,6 +89,6 @@ protected:
IEventDispatcher() {}
public:
virtual ~IEventDispatcher() throw() {}
virtual ~IEventDispatcher() = default;
virtual void DispatchEvent(const EvtParams &params) = 0;
};

View File

@ -128,7 +128,7 @@ protected:
wxString m_message; // a "detailed" message of what disastrous thing has occurred!
public:
virtual ~Ps2Generic() throw() {}
virtual ~Ps2Generic() = default;
virtual u32 GetPc() const = 0;
virtual bool IsDelaySlot() const = 0;
@ -157,7 +157,7 @@ private: \
typedef parent _parent; \
\
public: \
virtual ~classname() throw() {} \
virtual ~classname() = default; \
virtual void Rethrow() const { throw * this; } \
virtual classname *Clone() const { return new classname(*this); }

View File

@ -70,7 +70,7 @@ public:
class IActionInvocation
{
public:
virtual ~IActionInvocation() throw() {}
virtual ~IActionInvocation() = default;
virtual void InvokeAction() = 0;
};
@ -83,7 +83,7 @@ public:
class IDeletableObject
{
public:
virtual ~IDeletableObject() throw() {}
virtual ~IDeletableObject() = default;
virtual void DeleteSelf() = 0;
virtual bool IsBeingDeleted() = 0;

View File

@ -45,7 +45,7 @@ public:
typedef PageFaultInfo EvtParams;
public:
virtual ~IEventListener_PageFault() throw() {}
virtual ~IEventListener_PageFault() = default;
virtual void DispatchEvent(const PageFaultInfo &evtinfo, bool &handled)
{
@ -87,7 +87,7 @@ public:
Owner = dispatchTo;
}
virtual ~EventListenerHelper_PageFault() throw() {}
virtual ~EventListenerHelper_PageFault() = default;
protected:
virtual void OnPageFaultEvent(const PageFaultInfo &info, bool &handled)
@ -112,7 +112,7 @@ public:
: m_handled(false)
{
}
virtual ~SrcType_PageFault() throw() {}
virtual ~SrcType_PageFault() = default;
bool WasHandled() const { return m_handled; }
virtual void Dispatch(const PageFaultInfo &params);

View File

@ -39,7 +39,7 @@ public:
m_thread = NULL;
}
virtual ~EventListener_Thread() throw() {}
virtual ~EventListener_Thread() = default;
void SetThread(pxThread &thr) { m_thread = &thr; }
void SetThread(pxThread *thr) { m_thread = thr; }
@ -250,7 +250,7 @@ protected:
Mutex m_lock_TaskComplete;
public:
virtual ~BaseTaskThread() throw() {}
virtual ~BaseTaskThread() = default;
BaseTaskThread()
: m_Done(false)
, m_TaskPending(false)

View File

@ -71,7 +71,7 @@ class ScopedReadLock : public BaseScopedReadWriteLock
{
public:
ScopedReadLock(RwMutex &locker);
virtual ~ScopedReadLock() throw() {}
virtual ~ScopedReadLock() = default;
void Acquire();
};
@ -80,7 +80,7 @@ class ScopedWriteLock : public BaseScopedReadWriteLock
{
public:
ScopedWriteLock(RwMutex &locker);
virtual ~ScopedWriteLock() throw() {}
virtual ~ScopedWriteLock() = default;
void Acquire();

View File

@ -211,7 +211,7 @@ protected:
public:
NonblockingMutex() { val.clear(); }
virtual ~NonblockingMutex() throw() {}
virtual ~NonblockingMutex() = default;
bool TryAcquire() throw()
{
@ -353,7 +353,7 @@ public:
: ScopedLock(locker, true)
{
}
virtual ~ScopedTryLock() throw() {}
virtual ~ScopedTryLock() = default;
bool Failed() const { return !m_IsLocked; }
};

View File

@ -42,7 +42,7 @@ protected:
public:
WaitForTaskDialog(const wxString &title = wxEmptyString, const wxString &heading = wxEmptyString);
virtual ~WaitForTaskDialog() throw() {}
virtual ~WaitForTaskDialog() = default;
virtual int ShowModal();
protected:

View File

@ -40,7 +40,7 @@ protected:
public:
pxCheckBox(wxWindow *parent, const wxString &label, const wxString &subtext = wxEmptyString, int flags = wxCHK_2STATE);
pxCheckBox(wxWindow *parent, const wxString &label, int flags);
virtual ~pxCheckBox() throw() {}
virtual ~pxCheckBox() = default;
bool HasSubText() const { return m_subtext != NULL; }
const pxStaticText *GetSubText() const { return m_subtext; }

View File

@ -42,7 +42,7 @@ public:
return_value = 0;
}
virtual ~SynchronousActionState() throw() {}
virtual ~SynchronousActionState() = default;
void SetException(const BaseException &ex);
void SetException(BaseException *ex);
@ -99,7 +99,7 @@ protected:
SynchronousActionState *m_state;
public:
virtual ~pxActionEvent() throw() {}
virtual ~pxActionEvent() = default;
virtual pxActionEvent *Clone() const { return new pxActionEvent(*this); }
explicit pxActionEvent(SynchronousActionState *sema = NULL, int msgtype = pxEvt_InvokeAction);
@ -172,7 +172,7 @@ protected:
wxEventType m_realEvent;
public:
virtual ~pxSynchronousCommandEvent() throw() {}
virtual ~pxSynchronousCommandEvent() = default;
virtual pxSynchronousCommandEvent *Clone() const { return new pxSynchronousCommandEvent(*this); }
pxSynchronousCommandEvent(SynchronousActionState *sema = NULL, wxEventType commandType = wxEVT_NULL, int winid = 0);
@ -204,7 +204,7 @@ protected:
wxString m_Content;
public:
virtual ~BaseMessageBoxEvent() throw() {}
virtual ~BaseMessageBoxEvent() = default;
virtual BaseMessageBoxEvent *Clone() const { return new BaseMessageBoxEvent(*this); }
explicit BaseMessageBoxEvent(const wxString &content = wxEmptyString, SynchronousActionState *instdata = NULL);

View File

@ -117,7 +117,7 @@ public:
Init();
}
virtual ~pxRadioPanel() throw() {}
virtual ~pxRadioPanel() = default;
void Reset();
void Realize();

View File

@ -60,7 +60,7 @@ protected:
public:
pxStaticText(wxWindow *parent, const wxString &label, wxAlignment align = wxALIGN_CENTRE_HORIZONTAL);
pxStaticText(wxWindow *parent, int heightInLines, const wxString &label, wxAlignment align = wxALIGN_CENTRE_HORIZONTAL);
virtual ~pxStaticText() throw() {}
virtual ~pxStaticText() = default;
wxFont GetFontOk() const;
bool Enable(bool enabled = true);
@ -109,7 +109,7 @@ class pxStaticHeading : public pxStaticText
public:
pxStaticHeading(wxWindow *parent = NULL, const wxString &label = wxEmptyString);
pxStaticHeading(wxWindow *parent, int heightInLines, const wxString &label = wxEmptyString);
virtual ~pxStaticHeading() throw() {}
virtual ~pxStaticHeading() = default;
protected:
void SetPaddingDefaults();

View File

@ -33,7 +33,7 @@ protected:
public:
pxStreamBase(const wxString &filename);
virtual ~pxStreamBase() throw() {}
virtual ~pxStreamBase() = default;
// Implementing classes should return the base wxStream object (usually either a wxInputStream
// or wxOputStream derivative).
@ -62,7 +62,7 @@ public:
pxOutputStream(const wxString &filename, std::unique_ptr<wxOutputStream> &output);
pxOutputStream(const wxString &filename, wxOutputStream *output);
virtual ~pxOutputStream() throw() {}
virtual ~pxOutputStream() = default;
virtual void Write(const void *data, size_t size);
void SetStream(const wxString &filename, std::unique_ptr<wxOutputStream> &stream);
@ -96,7 +96,7 @@ public:
pxInputStream(const wxString &filename, std::unique_ptr<wxInputStream> &input);
pxInputStream(const wxString &filename, wxInputStream *input);
virtual ~pxInputStream() throw() {}
virtual ~pxInputStream() = default;
virtual void Read(void *dest, size_t size);
void SetStream(const wxString &filename, std::unique_ptr<wxInputStream> &stream);

View File

@ -50,7 +50,7 @@ class ModalButtonPanel : public wxPanelWithHelpers
{
public:
ModalButtonPanel(wxWindow *window, const MsgButtons &buttons);
virtual ~ModalButtonPanel() throw() {}
virtual ~ModalButtonPanel() = default;
virtual void AddActionButton(wxWindowID id);
virtual void AddCustomButton(wxWindowID id, const wxString &label);

View File

@ -292,7 +292,7 @@ public:
bool hasCloseBox;
public:
virtual ~pxDialogCreationFlags() throw() {}
virtual ~pxDialogCreationFlags() = default;
pxDialogCreationFlags()
{
@ -605,7 +605,7 @@ protected:
wxString m_indent;
public:
virtual ~pxTextWrapperBase() throw() {}
virtual ~pxTextWrapperBase() = default;
pxTextWrapperBase(const wxString &indent = wxEmptyString)
: m_indent(indent)
@ -653,7 +653,7 @@ public:
{
}
virtual ~pxTextWrapper() throw() {}
virtual ~pxTextWrapper() = default;
const wxString &GetResult() const
{
@ -686,7 +686,7 @@ protected:
public:
pxWindowTextWriter(wxDC &dc);
virtual ~pxWindowTextWriter() throw() {}
virtual ~pxWindowTextWriter() = default;
virtual void OnFontChanged();
@ -746,7 +746,7 @@ protected:
public:
MoreStockCursors() {}
virtual ~MoreStockCursors() throw() {}
virtual ~MoreStockCursors() = default;
const wxCursor &GetArrowWait();
};