From: Vadim Zeitlin Date: Mon, 22 Jun 2009 12:13:56 +0000 (+0000) Subject: extract event handler body in a separate function instead of using a hack to call... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9aeace31b72392f7dbe55af5830ec900682b0b33 extract event handler body in a separate function instead of using a hack to call it with a NULL reference git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/combo/combo.cpp b/samples/combo/combo.cpp index 8123b5a7be..fd5abd249d 100644 --- a/samples/combo/combo.cpp +++ b/samples/combo/combo.cpp @@ -532,11 +532,17 @@ public: m_animTimer.SetOwner( this, wxID_ANY ); m_animTimer.Start( 10, wxTIMER_CONTINUOUS ); - OnTimerEvent(*((wxTimerEvent*)NULL)); // Event is never used, so we can give NULL + DoOnTimer(); return false; } +private: void OnTimerEvent( wxTimerEvent& WXUNUSED(event) ) + { + DoOnTimer(); + } + + void DoOnTimer() { bool stopTimer = false; @@ -592,8 +598,6 @@ public: } } -protected: - // Popup animation related wxLongLong m_animStart; wxTimer m_animTimer; @@ -601,7 +605,6 @@ protected: wxBitmap m_animBackBitmap; int m_animFlags; -private: DECLARE_EVENT_TABLE() };