Replace dynamic casts with virtual wxWindow::WXGetTextEntry()
Instead of checking for all text-like controls one by one in wxCommandEvent::GetString(), call a virtual function checking for this. This is simpler, less error-prone and faster -- at the cost of increasing the vtbl size of all wxWindow-derived classes. Closes https://github.com/wxWidgets/wxWidgets/pull/1696
This commit is contained in:
@@ -108,6 +108,8 @@ public:
|
||||
virtual void Popup() { wxFAIL_MSG( wxT("Not implemented") ); }
|
||||
virtual void Dismiss() { wxFAIL_MSG( wxT("Not implemented") ); }
|
||||
|
||||
virtual const wxTextEntry* WXGetTextEntry() const { return this; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoSetSize(int x, int y,
|
||||
|
Reference in New Issue
Block a user