mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
b951e24024
commit
1a9a65d4d0
|
@ -49,7 +49,7 @@ public:
|
||||||
m_cache_valid = false;
|
m_cache_valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~EventSource() throw() {}
|
virtual ~EventSource() = default;
|
||||||
|
|
||||||
virtual ListenerIterator Add(ListenerType &listener);
|
virtual ListenerIterator Add(ListenerType &listener);
|
||||||
virtual void Remove(ListenerType &listener);
|
virtual void Remove(ListenerType &listener);
|
||||||
|
@ -89,6 +89,6 @@ protected:
|
||||||
IEventDispatcher() {}
|
IEventDispatcher() {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~IEventDispatcher() throw() {}
|
virtual ~IEventDispatcher() = default;
|
||||||
virtual void DispatchEvent(const EvtParams ¶ms) = 0;
|
virtual void DispatchEvent(const EvtParams ¶ms) = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -128,7 +128,7 @@ protected:
|
||||||
wxString m_message; // a "detailed" message of what disastrous thing has occurred!
|
wxString m_message; // a "detailed" message of what disastrous thing has occurred!
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~Ps2Generic() throw() {}
|
virtual ~Ps2Generic() = default;
|
||||||
|
|
||||||
virtual u32 GetPc() const = 0;
|
virtual u32 GetPc() const = 0;
|
||||||
virtual bool IsDelaySlot() const = 0;
|
virtual bool IsDelaySlot() const = 0;
|
||||||
|
@ -157,7 +157,7 @@ private: \
|
||||||
typedef parent _parent; \
|
typedef parent _parent; \
|
||||||
\
|
\
|
||||||
public: \
|
public: \
|
||||||
virtual ~classname() throw() {} \
|
virtual ~classname() = default; \
|
||||||
virtual void Rethrow() const { throw * this; } \
|
virtual void Rethrow() const { throw * this; } \
|
||||||
virtual classname *Clone() const { return new classname(*this); }
|
virtual classname *Clone() const { return new classname(*this); }
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ public:
|
||||||
class IActionInvocation
|
class IActionInvocation
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~IActionInvocation() throw() {}
|
virtual ~IActionInvocation() = default;
|
||||||
virtual void InvokeAction() = 0;
|
virtual void InvokeAction() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ public:
|
||||||
class IDeletableObject
|
class IDeletableObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~IDeletableObject() throw() {}
|
virtual ~IDeletableObject() = default;
|
||||||
|
|
||||||
virtual void DeleteSelf() = 0;
|
virtual void DeleteSelf() = 0;
|
||||||
virtual bool IsBeingDeleted() = 0;
|
virtual bool IsBeingDeleted() = 0;
|
||||||
|
|
|
@ -45,7 +45,7 @@ public:
|
||||||
typedef PageFaultInfo EvtParams;
|
typedef PageFaultInfo EvtParams;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~IEventListener_PageFault() throw() {}
|
virtual ~IEventListener_PageFault() = default;
|
||||||
|
|
||||||
virtual void DispatchEvent(const PageFaultInfo &evtinfo, bool &handled)
|
virtual void DispatchEvent(const PageFaultInfo &evtinfo, bool &handled)
|
||||||
{
|
{
|
||||||
|
@ -87,7 +87,7 @@ public:
|
||||||
Owner = dispatchTo;
|
Owner = dispatchTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~EventListenerHelper_PageFault() throw() {}
|
virtual ~EventListenerHelper_PageFault() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void OnPageFaultEvent(const PageFaultInfo &info, bool &handled)
|
virtual void OnPageFaultEvent(const PageFaultInfo &info, bool &handled)
|
||||||
|
@ -112,7 +112,7 @@ public:
|
||||||
: m_handled(false)
|
: m_handled(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual ~SrcType_PageFault() throw() {}
|
virtual ~SrcType_PageFault() = default;
|
||||||
|
|
||||||
bool WasHandled() const { return m_handled; }
|
bool WasHandled() const { return m_handled; }
|
||||||
virtual void Dispatch(const PageFaultInfo ¶ms);
|
virtual void Dispatch(const PageFaultInfo ¶ms);
|
||||||
|
|
|
@ -39,7 +39,7 @@ public:
|
||||||
m_thread = NULL;
|
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; }
|
||||||
void SetThread(pxThread *thr) { m_thread = thr; }
|
void SetThread(pxThread *thr) { m_thread = thr; }
|
||||||
|
@ -250,7 +250,7 @@ protected:
|
||||||
Mutex m_lock_TaskComplete;
|
Mutex m_lock_TaskComplete;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~BaseTaskThread() throw() {}
|
virtual ~BaseTaskThread() = default;
|
||||||
BaseTaskThread()
|
BaseTaskThread()
|
||||||
: m_Done(false)
|
: m_Done(false)
|
||||||
, m_TaskPending(false)
|
, m_TaskPending(false)
|
||||||
|
|
|
@ -71,7 +71,7 @@ class ScopedReadLock : public BaseScopedReadWriteLock
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScopedReadLock(RwMutex &locker);
|
ScopedReadLock(RwMutex &locker);
|
||||||
virtual ~ScopedReadLock() throw() {}
|
virtual ~ScopedReadLock() = default;
|
||||||
|
|
||||||
void Acquire();
|
void Acquire();
|
||||||
};
|
};
|
||||||
|
@ -80,7 +80,7 @@ class ScopedWriteLock : public BaseScopedReadWriteLock
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScopedWriteLock(RwMutex &locker);
|
ScopedWriteLock(RwMutex &locker);
|
||||||
virtual ~ScopedWriteLock() throw() {}
|
virtual ~ScopedWriteLock() = default;
|
||||||
|
|
||||||
void Acquire();
|
void Acquire();
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NonblockingMutex() { val.clear(); }
|
NonblockingMutex() { val.clear(); }
|
||||||
virtual ~NonblockingMutex() throw() {}
|
virtual ~NonblockingMutex() = default;
|
||||||
|
|
||||||
bool TryAcquire() throw()
|
bool TryAcquire() throw()
|
||||||
{
|
{
|
||||||
|
@ -353,7 +353,7 @@ public:
|
||||||
: ScopedLock(locker, true)
|
: ScopedLock(locker, true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
virtual ~ScopedTryLock() throw() {}
|
virtual ~ScopedTryLock() = default;
|
||||||
bool Failed() const { return !m_IsLocked; }
|
bool Failed() const { return !m_IsLocked; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WaitForTaskDialog(const wxString &title = wxEmptyString, const wxString &heading = wxEmptyString);
|
WaitForTaskDialog(const wxString &title = wxEmptyString, const wxString &heading = wxEmptyString);
|
||||||
virtual ~WaitForTaskDialog() throw() {}
|
virtual ~WaitForTaskDialog() = default;
|
||||||
virtual int ShowModal();
|
virtual int ShowModal();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -40,7 +40,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
pxCheckBox(wxWindow *parent, const wxString &label, const wxString &subtext = wxEmptyString, int flags = wxCHK_2STATE);
|
pxCheckBox(wxWindow *parent, const wxString &label, const wxString &subtext = wxEmptyString, int flags = wxCHK_2STATE);
|
||||||
pxCheckBox(wxWindow *parent, const wxString &label, int flags);
|
pxCheckBox(wxWindow *parent, const wxString &label, int flags);
|
||||||
virtual ~pxCheckBox() throw() {}
|
virtual ~pxCheckBox() = default;
|
||||||
|
|
||||||
bool HasSubText() const { return m_subtext != NULL; }
|
bool HasSubText() const { return m_subtext != NULL; }
|
||||||
const pxStaticText *GetSubText() const { return m_subtext; }
|
const pxStaticText *GetSubText() const { return m_subtext; }
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
return_value = 0;
|
return_value = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~SynchronousActionState() throw() {}
|
virtual ~SynchronousActionState() = default;
|
||||||
|
|
||||||
void SetException(const BaseException &ex);
|
void SetException(const BaseException &ex);
|
||||||
void SetException(BaseException *ex);
|
void SetException(BaseException *ex);
|
||||||
|
@ -99,7 +99,7 @@ protected:
|
||||||
SynchronousActionState *m_state;
|
SynchronousActionState *m_state;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~pxActionEvent() throw() {}
|
virtual ~pxActionEvent() = default;
|
||||||
virtual pxActionEvent *Clone() const { return new pxActionEvent(*this); }
|
virtual pxActionEvent *Clone() const { return new pxActionEvent(*this); }
|
||||||
|
|
||||||
explicit pxActionEvent(SynchronousActionState *sema = NULL, int msgtype = pxEvt_InvokeAction);
|
explicit pxActionEvent(SynchronousActionState *sema = NULL, int msgtype = pxEvt_InvokeAction);
|
||||||
|
@ -172,7 +172,7 @@ protected:
|
||||||
wxEventType m_realEvent;
|
wxEventType m_realEvent;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~pxSynchronousCommandEvent() throw() {}
|
virtual ~pxSynchronousCommandEvent() = default;
|
||||||
virtual pxSynchronousCommandEvent *Clone() const { return new pxSynchronousCommandEvent(*this); }
|
virtual pxSynchronousCommandEvent *Clone() const { return new pxSynchronousCommandEvent(*this); }
|
||||||
|
|
||||||
pxSynchronousCommandEvent(SynchronousActionState *sema = NULL, wxEventType commandType = wxEVT_NULL, int winid = 0);
|
pxSynchronousCommandEvent(SynchronousActionState *sema = NULL, wxEventType commandType = wxEVT_NULL, int winid = 0);
|
||||||
|
@ -204,7 +204,7 @@ protected:
|
||||||
wxString m_Content;
|
wxString m_Content;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~BaseMessageBoxEvent() throw() {}
|
virtual ~BaseMessageBoxEvent() = default;
|
||||||
virtual BaseMessageBoxEvent *Clone() const { return new BaseMessageBoxEvent(*this); }
|
virtual BaseMessageBoxEvent *Clone() const { return new BaseMessageBoxEvent(*this); }
|
||||||
|
|
||||||
explicit BaseMessageBoxEvent(const wxString &content = wxEmptyString, SynchronousActionState *instdata = NULL);
|
explicit BaseMessageBoxEvent(const wxString &content = wxEmptyString, SynchronousActionState *instdata = NULL);
|
||||||
|
|
|
@ -117,7 +117,7 @@ public:
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~pxRadioPanel() throw() {}
|
virtual ~pxRadioPanel() = default;
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
void Realize();
|
void Realize();
|
||||||
|
|
|
@ -60,7 +60,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
pxStaticText(wxWindow *parent, const wxString &label, wxAlignment align = wxALIGN_CENTRE_HORIZONTAL);
|
pxStaticText(wxWindow *parent, const wxString &label, wxAlignment align = wxALIGN_CENTRE_HORIZONTAL);
|
||||||
pxStaticText(wxWindow *parent, int heightInLines, 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;
|
wxFont GetFontOk() const;
|
||||||
bool Enable(bool enabled = true);
|
bool Enable(bool enabled = true);
|
||||||
|
@ -109,7 +109,7 @@ class pxStaticHeading : public pxStaticText
|
||||||
public:
|
public:
|
||||||
pxStaticHeading(wxWindow *parent = NULL, const wxString &label = wxEmptyString);
|
pxStaticHeading(wxWindow *parent = NULL, const wxString &label = wxEmptyString);
|
||||||
pxStaticHeading(wxWindow *parent, int heightInLines, const wxString &label = wxEmptyString);
|
pxStaticHeading(wxWindow *parent, int heightInLines, const wxString &label = wxEmptyString);
|
||||||
virtual ~pxStaticHeading() throw() {}
|
virtual ~pxStaticHeading() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void SetPaddingDefaults();
|
void SetPaddingDefaults();
|
||||||
|
|
|
@ -33,7 +33,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
pxStreamBase(const wxString &filename);
|
pxStreamBase(const wxString &filename);
|
||||||
virtual ~pxStreamBase() throw() {}
|
virtual ~pxStreamBase() = default;
|
||||||
|
|
||||||
// Implementing classes should return the base wxStream object (usually either a wxInputStream
|
// Implementing classes should return the base wxStream object (usually either a wxInputStream
|
||||||
// or wxOputStream derivative).
|
// or wxOputStream derivative).
|
||||||
|
@ -62,7 +62,7 @@ public:
|
||||||
pxOutputStream(const wxString &filename, std::unique_ptr<wxOutputStream> &output);
|
pxOutputStream(const wxString &filename, std::unique_ptr<wxOutputStream> &output);
|
||||||
pxOutputStream(const wxString &filename, wxOutputStream *output);
|
pxOutputStream(const wxString &filename, wxOutputStream *output);
|
||||||
|
|
||||||
virtual ~pxOutputStream() throw() {}
|
virtual ~pxOutputStream() = default;
|
||||||
virtual void Write(const void *data, size_t size);
|
virtual void Write(const void *data, size_t size);
|
||||||
|
|
||||||
void SetStream(const wxString &filename, std::unique_ptr<wxOutputStream> &stream);
|
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, std::unique_ptr<wxInputStream> &input);
|
||||||
pxInputStream(const wxString &filename, wxInputStream *input);
|
pxInputStream(const wxString &filename, wxInputStream *input);
|
||||||
|
|
||||||
virtual ~pxInputStream() throw() {}
|
virtual ~pxInputStream() = default;
|
||||||
virtual void Read(void *dest, size_t size);
|
virtual void Read(void *dest, size_t size);
|
||||||
|
|
||||||
void SetStream(const wxString &filename, std::unique_ptr<wxInputStream> &stream);
|
void SetStream(const wxString &filename, std::unique_ptr<wxInputStream> &stream);
|
||||||
|
|
|
@ -50,7 +50,7 @@ class ModalButtonPanel : public wxPanelWithHelpers
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ModalButtonPanel(wxWindow *window, const MsgButtons &buttons);
|
ModalButtonPanel(wxWindow *window, const MsgButtons &buttons);
|
||||||
virtual ~ModalButtonPanel() throw() {}
|
virtual ~ModalButtonPanel() = default;
|
||||||
|
|
||||||
virtual void AddActionButton(wxWindowID id);
|
virtual void AddActionButton(wxWindowID id);
|
||||||
virtual void AddCustomButton(wxWindowID id, const wxString &label);
|
virtual void AddCustomButton(wxWindowID id, const wxString &label);
|
||||||
|
|
|
@ -292,7 +292,7 @@ public:
|
||||||
bool hasCloseBox;
|
bool hasCloseBox;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~pxDialogCreationFlags() throw() {}
|
virtual ~pxDialogCreationFlags() = default;
|
||||||
|
|
||||||
pxDialogCreationFlags()
|
pxDialogCreationFlags()
|
||||||
{
|
{
|
||||||
|
@ -605,7 +605,7 @@ protected:
|
||||||
wxString m_indent;
|
wxString m_indent;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~pxTextWrapperBase() throw() {}
|
virtual ~pxTextWrapperBase() = default;
|
||||||
|
|
||||||
pxTextWrapperBase(const wxString &indent = wxEmptyString)
|
pxTextWrapperBase(const wxString &indent = wxEmptyString)
|
||||||
: m_indent(indent)
|
: m_indent(indent)
|
||||||
|
@ -653,7 +653,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~pxTextWrapper() throw() {}
|
virtual ~pxTextWrapper() = default;
|
||||||
|
|
||||||
const wxString &GetResult() const
|
const wxString &GetResult() const
|
||||||
{
|
{
|
||||||
|
@ -686,7 +686,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
pxWindowTextWriter(wxDC &dc);
|
pxWindowTextWriter(wxDC &dc);
|
||||||
virtual ~pxWindowTextWriter() throw() {}
|
virtual ~pxWindowTextWriter() = default;
|
||||||
|
|
||||||
virtual void OnFontChanged();
|
virtual void OnFontChanged();
|
||||||
|
|
||||||
|
@ -746,7 +746,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MoreStockCursors() {}
|
MoreStockCursors() {}
|
||||||
virtual ~MoreStockCursors() throw() {}
|
virtual ~MoreStockCursors() = default;
|
||||||
const wxCursor &GetArrowWait();
|
const wxCursor &GetArrowWait();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue