lookup the classes in the hash table if it had been already set up

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-01-16 00:34:41 +00:00
parent 4a1b95962f
commit 80e8062f67

View 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