X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..50c319beec2454b4f669b6c8cf3d089f53c979f6:/src/common/module.cpp diff --git a/src/common/module.cpp b/src/common/module.cpp index bd2b82d782..b18af89b14 100644 --- a/src/common/module.cpp +++ b/src/common/module.cpp @@ -21,6 +21,7 @@ #endif #include "wx/module.h" +#include "wx/hash.h" IMPLEMENT_CLASS(wxModule, wxObject) @@ -35,16 +36,21 @@ void wxModule::RegisterModule(wxModule* module) // and register them. bool wxModule::RegisterModules(void) { - wxClassInfo* classInfo = wxClassInfo::first; - while (classInfo) + wxNode *node; + wxClassInfo* classInfo; + + wxClassInfo::sm_classTable->BeginFind(); + node = wxClassInfo::sm_classTable->Next(); + while (node) { - if ((classInfo != (& (wxModule::classwxModule))) && + classInfo = (wxClassInfo *)node->Data(); + if ((classInfo != (& (wxModule::sm_classwxModule))) && classInfo->IsKindOf(CLASSINFO(wxModule))) { wxModule* module = (wxModule*) classInfo->CreateObject(); RegisterModule(module); } - classInfo = classInfo->next; + node = wxClassInfo::sm_classTable->Next(); } return TRUE; }