Use wxDynamicCast() instead of IsKindOf() checks.
wxDynamicCast() is less verbose (due to the absence of "CLASSINFO") and more compatible with the standard dynamic_cast<>, so prefer to use it when possible. See #14356. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -517,7 +517,7 @@ bool wxComboPopupWindow::ProcessLeftDown(wxMouseEvent& event)
|
||||
void wxComboPopupWindow::OnDismiss()
|
||||
{
|
||||
wxComboCtrlBase* combo = (wxComboCtrlBase*) GetParent();
|
||||
wxASSERT_MSG( combo->IsKindOf(CLASSINFO(wxComboCtrlBase)),
|
||||
wxASSERT_MSG( wxDynamicCast(combo, wxComboCtrlBase),
|
||||
wxT("parent might not be wxComboCtrl, but check IMPLEMENT_DYNAMIC_CLASS(2) macro for correctness") );
|
||||
|
||||
combo->OnPopupDismiss(true);
|
||||
|
Reference in New Issue
Block a user