From 7fdfc5b3a2dcdd6ed5e7938f1a5e099f34d9f259 Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Mon, 18 Apr 2005 17:09:25 +0000 Subject: [PATCH] cleanup for wxUSE_THREADS git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/appbase.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 8dec8e8a92..3901c4def1 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -272,6 +272,7 @@ void wxAppConsole::ProcessPendingEvents() #if wxUSE_THREADS if ( !wxPendingEventsLocker ) return; +#endif // ensure that we're the only thread to modify the pending events list wxENTER_CRIT_SECT( *wxPendingEventsLocker ); @@ -281,7 +282,6 @@ void wxAppConsole::ProcessPendingEvents() wxLEAVE_CRIT_SECT( *wxPendingEventsLocker ); return; } -#endif // iterate until the list becomes empty wxList::compatibility_iterator node = wxPendingEvents->GetFirst(); @@ -290,24 +290,18 @@ void wxAppConsole::ProcessPendingEvents() wxEvtHandler *handler = (wxEvtHandler *)node->GetData(); wxPendingEvents->Erase(node); -#if wxUSE_THREADS // In ProcessPendingEvents(), new handlers might be add // and we can safely leave the critical section here. wxLEAVE_CRIT_SECT( *wxPendingEventsLocker ); -#endif handler->ProcessPendingEvents(); -#if wxUSE_THREADS wxENTER_CRIT_SECT( *wxPendingEventsLocker ); -#endif node = wxPendingEvents->GetFirst(); } -#if wxUSE_THREADS wxLEAVE_CRIT_SECT( *wxPendingEventsLocker ); -#endif } int wxAppConsole::FilterEvent(wxEvent& WXUNUSED(event))