]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use wx/scopeguard.h for OpenWatcom compatibility (grr...)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 20 Sep 2003 15:12:39 +0000 (15:12 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 20 Sep 2003 15:12:39 +0000 (15:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/evtloop.cpp

index c2540c8ee913daae1d97d5ca1b884502f3b2c616..6525319a370ba48da6f0d3c3d5739e5851420006 100644 (file)
@@ -38,7 +38,6 @@
 #include "wx/tooltip.h"
 #include "wx/except.h"
 #include "wx/ptr_scpd.h"
-#include "wx/scopeguard.h"
 
 #include "wx/msw/private.h"
 
@@ -241,7 +240,19 @@ int wxEventLoop::Run()
     wxEventLoopActivator activate(&ms_activeLoop, this);
     wxEventLoopImplTiedPtr impl(&m_impl, new wxEventLoopImpl);
 
-    wxON_BLOCK_EXIT_OBJ0(*this, &wxEventLoop::OnExit);
+    class CallEventLoopMethod
+    {
+    public:
+        typedef void (wxEventLoop::*FuncType)();
+
+        CallEventLoopMethod(wxEventLoop *evtLoop, FuncType fn)
+            : m_evtLoop(evtLoop), m_fn(fn) { }
+        ~CallEventLoopMethod() { (m_evtLoop->*m_fn)(); }
+
+    private:
+        wxEventLoop *m_evtLoop;
+        FuncType m_fn;
+    } callOnExit(this, wxEventLoop::OnExit);
 
     for ( ;; )
     {