From 31a33b67c0f6a6e6bf9cd084f64b7aa57db3dd0d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 1 Jun 2012 11:01:09 +0000 Subject: [PATCH] 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 --- src/common/combocmn.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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() ) { -- 2.50.0