Use const_cast to change the constness

This commit is contained in:
Artur Wieczorek
2019-06-16 17:09:23 +02:00
parent 2ebdfb7a40
commit b064608c2a
9 changed files with 20 additions and 20 deletions

View File

@@ -460,7 +460,7 @@ public:
wxWindow* GetButton( unsigned int i ) { return m_buttons[i]; }
const wxWindow* GetButton( unsigned int i ) const
{ return (const wxWindow*) m_buttons[i]; }
{ return const_cast<const wxWindow*>(m_buttons[i]); }
// Utility function to be used in event handlers.
int GetButtonId( unsigned int i ) const { return GetButton(i)->GetId(); }