]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/combocmn.cpp
Fix uninitialized variable warning in wxMSW wxFileSystemWatcher code.
[wxWidgets.git] / src / common / combocmn.cpp
index 2136fbd1cc1ccf729de886373985d17deb8ffcc6..8bd7e4cd71aa23572789db5e41805bddbb189f1e 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() )
     {
@@ -518,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);