From: Vadim Zeitlin Date: Fri, 1 Jun 2012 11:01:09 +0000 (+0000) Subject: Remove unnecessary dynamic cast in wxComboPopupWindow. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/31a33b67c0f6a6e6bf9cd084f64b7aa57db3dd0d Remove unnecessary dynamic cast in wxComboPopupWindow. Objects of this type are either always of wxPopupTransientWindow type, in which case just a static_cast<> is enough and we don't need a dynamic one, or is never of its type in which case this code shouldn't be compiled and if it is, then static_cast<> will correctly fail preventing it from compiling. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 2136fbd1cc..7679787977 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -489,9 +489,8 @@ bool wxComboPopupWindow::Show( bool show ) m_inShow++; - wxASSERT( IsKindOf(CLASSINFO(wxPopupTransientWindow)) ); - - wxPopupTransientWindow* ptw = (wxPopupTransientWindow*) this; + wxPopupTransientWindow* const + ptw = static_cast(this); if ( show != ptw->IsShown() ) {