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
This commit is contained in:
Vadim Zeitlin 2009-06-22 12:13:56 +00:00
parent ca3b3fbb11
commit 9aeace31b7

View File

@ -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()
};