]> git.saurik.com Git - wxWidgets.git/commitdiff
Remove unnecessary dynamic cast in wxComboPopupWindow.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 1 Jun 2012 11:01:09 +0000 (11:01 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 1 Jun 2012 11:01:09 +0000 (11:01 +0000)
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

index 2136fbd1cc1ccf729de886373985d17deb8ffcc6..767978797741ac802757fd0c3d5a6872a98e9f59 100644 (file)
@@ -489,9 +489,8 @@ bool wxComboPopupWindow::Show( bool show )
 
     m_inShow++;
 
-    wxASSERT( IsKindOf(CLASSINFO(wxPopupTransientWindow)) );
-
-    wxPopupTransientWindow* ptw = (wxPopupTransientWindow*) this;
+    wxPopupTransientWindow* const
+        ptw = static_cast<wxPopupTransientWindow*>(this);
 
     if ( show != ptw->IsShown() )
     {