]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/object.cpp
Added wxUSE_GUI=0 to EXTRAFLAGS to make it compile on the command line
[wxWidgets.git] / src / common / object.cpp
index 120d0afac5ef0ce6f974c193df60197119ad4717..86b84c8a4370cf79d26e2f740fc90192a834068a 100644 (file)
@@ -135,11 +135,20 @@ void wxObject::operator delete[] (void *buf)
 
 wxClassInfo *wxClassInfo::FindClass(const wxChar *className)
 {
-    for(wxClassInfo *info = sm_first; info ; info = info->m_next)
-        if( wxStrcmp(info->GetClassName(), className) == 0 )
-            return info;
+    if ( sm_classTable )
+    {
+        return (wxClassInfo *)wxClassInfo::sm_classTable->Get(className);
+    }
+    else
+    {
+        for ( wxClassInfo *info = sm_first; info ; info = info->m_next )
+        {
+            if ( wxStrcmp(info->GetClassName(), className) == 0 )
+                return info;
+        }
 
-    return 0;
+        return NULL;
+    }
 }
 
     // Set pointers to base class(es) to speed up IsKindOf