make wxScopeGuardImplBase copy ctor public to avoid Sun CC warnings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-09-21 12:27:25 +00:00
parent 74ab5f5b9d
commit f7e81ed1c2

View File

@@ -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;