From: Vadim Zeitlin Date: Sat, 20 Sep 2003 15:12:39 +0000 (+0000) Subject: don't use wx/scopeguard.h for OpenWatcom compatibility (grr...) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/462988d5f91a2ae8d4eb1f061c97c5d9adaac8fd don't use wx/scopeguard.h for OpenWatcom compatibility (grr...) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/evtloop.cpp b/src/msw/evtloop.cpp index c2540c8ee9..6525319a37 100644 --- a/src/msw/evtloop.cpp +++ b/src/msw/evtloop.cpp @@ -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 ( ;; ) {