clean up wxEvtHandler::m_eventsLocker weirdness: there is no need to allocate it dynamically (as it's always done anyhow), this removes the need for ClearEventLocker() and OS/2 #ifdefs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-01-05 19:07:52 +00:00
parent ad294cb8f6
commit 8ebec7dcd8
3 changed files with 8 additions and 47 deletions

View File

@@ -23,15 +23,13 @@
#endif
#include "wx/dynarray.h"
#include "wx/thread.h"
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_BASE wxList;
#if wxUSE_THREADS
class WXDLLIMPEXP_FWD_BASE wxCriticalSection;
#endif
#if wxUSE_GUI
class WXDLLIMPEXP_FWD_CORE wxDC;
class WXDLLIMPEXP_FWD_CORE wxMenu;
@@ -2359,10 +2357,6 @@ public:
virtual bool SearchEventTable(wxEventTable& table, wxEvent& event);
bool SearchDynamicEventTable( wxEvent& event );
#if wxUSE_THREADS
void ClearEventLocker();
#endif // wxUSE_THREADS
// Avoid problems at exit by cleaning up static hash table gracefully
void ClearEventHashTable() { GetEventHashTable().Clear(); }
@@ -2402,18 +2396,9 @@ protected:
wxList* m_pendingEvents;
#if wxUSE_THREADS
#if defined (__VISAGECPP__)
const wxCriticalSection& Lock() const { return m_eventsLocker; }
wxCriticalSection& Lock() { return m_eventsLocker; }
wxCriticalSection m_eventsLocker;
# else
const wxCriticalSection& Lock() const { return *m_eventsLocker; }
wxCriticalSection& Lock() { return *m_eventsLocker; }
wxCriticalSection* m_eventsLocker;
# endif
#endif
// critical section protecting m_pendingEvents
wxCriticalSection m_pendingEventsLock;
#endif // wxUSE_THREADS
// Is event handler enabled?
bool m_enabled;