From 82b644d79f5b65ba2bb04d1cc056b1862d40128e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 24 Aug 2014 15:31:37 +0000 Subject: [PATCH] No real changes, just simplify SafelyProcessEvent() slightly. Remove a long comment about initializing "loop" in 2 steps and just do it in 1 step instead. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/event.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/common/event.cpp b/src/common/event.cpp index 16a8b98b63..ddd90d8f6d 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -1615,15 +1615,9 @@ bool wxEvtHandler::SafelyProcessEvent(wxEvent& event) } catch ( ... ) { - // notice that we do it in 2 steps to avoid warnings about possibly - // uninitialized loop variable from some versions of g++ which are not - // smart enough to figure out that GetActive() doesn't throw and so - // that loop will always be initialized - wxEventLoopBase *loop = NULL; + wxEventLoopBase * const loop = wxEventLoopBase::GetActive(); try { - loop = wxEventLoopBase::GetActive(); - if ( !wxTheApp || !wxTheApp->OnExceptionInMainLoop() ) { if ( loop )