X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4300caa7a669d1e09e7d5dfd739acf4bb08e8b49..ff1b5f81af5dce8dac0c134f0e01adffc5334347:/src/msw/evtloop.cpp 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 ( ;; ) {