X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e196c0a258daf3b01ea7d513a4df98f786717000..82c6387837096ddd8c0d8f3a2ef7b9d889ec8f75:/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;