]> git.saurik.com Git - wxWidgets.git/commitdiff
make wxScopeGuardImplBase copy ctor public to avoid Sun CC warnings
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 21 Sep 2007 12:27:25 +0000 (12:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 21 Sep 2007 12:27:25 +0000 (12:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/scopeguard.h

index 45dee8caef22e8fd08e703f46dc3afb04039cdd5..f1f5a8204c4c7e9406468a57a844625c9a79caf0 100644 (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;