X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e196c0a258daf3b01ea7d513a4df98f786717000..c3c62822fdda9d340179dec663a806e905882cc9:/include/wx/scopeguard.h diff --git a/include/wx/scopeguard.h b/include/wx/scopeguard.h index 45dee8caef..f1f5a8204c 100644 --- a/include/wx/scopeguard.h +++ b/include/wx/scopeguard.h @@ -103,6 +103,12 @@ class wxScopeGuardImplBase public: wxScopeGuardImplBase() : m_wasDismissed(false) { } + wxScopeGuardImplBase(const wxScopeGuardImplBase& other) + : m_wasDismissed(other.m_wasDismissed) + { + other.Dismiss(); + } + void Dismiss() const { m_wasDismissed = true; } // for OnScopeExit() only (we can't make it friend, unfortunately)! @@ -111,12 +117,6 @@ public: protected: ~wxScopeGuardImplBase() { } - wxScopeGuardImplBase(const wxScopeGuardImplBase& other) - : m_wasDismissed(other.m_wasDismissed) - { - other.Dismiss(); - } - // must be mutable for copy ctor to work mutable bool m_wasDismissed;