]> git.saurik.com Git - wxWidgets.git/commitdiff
Cleaned up wxPropertyGrid::SetCurrentCategory()
authorJaakko Salli <jaakko.salli@dnainternet.net>
Sat, 13 Sep 2008 19:43:44 +0000 (19:43 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Sat, 13 Sep 2008 19:43:44 +0000 (19:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/propgrid/propgrid.h

index 2666cee1b438dd49cca974af4ed3074337343285..c9bf181175d958d1617670a1d605b3710b615e3c 100644 (file)
@@ -967,10 +967,8 @@ public:
     void SetCurrentCategory( wxPGPropArg id )
     {
         wxPG_PROP_ARG_CALL_PROLOG()
-        wxPropertyCategory* pc = (wxPropertyCategory*)p;
-#ifdef __WXDEBUG__
-        if ( pc ) wxASSERT( pc->IsCategory() );
-#endif
+        wxPropertyCategory* pc = wxDynamicCast(p, wxPropertyCategory);
+        wxASSERT(pc);
         m_pState->m_currentCategory = pc;
     }