X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ed9cd2891d4479fa3c2b822c474e96c5f34a488..c13815810e8ff427614ca82fe0dfd4b1e773f0f3:/src/common/dynload.cpp?ds=sidebyside diff --git a/src/common/dynload.cpp b/src/common/dynload.cpp index e9febf28cb..c2f1585adc 100644 --- a/src/common/dynload.cpp +++ b/src/common/dynload.cpp @@ -79,20 +79,21 @@ wxPluginLibrary::wxPluginLibrary(const wxString &libname, int flags) const wxClassInfo* const oldFirst = wxClassInfo::GetFirst(); Load( libname, flags ); - // It is simple to know what is the last object we registered, it's just - // the new head of the wxClassInfo list: - m_ourLast = wxClassInfo::GetFirst(); + // It is simple to know what is the first object in the linked list of + // wxClassInfo that we registered (it's also the last one chronologically), + // it's just the new head of the wxClassInfo list: + m_ourFirst = wxClassInfo::GetFirst(); // But to find the first wxClassInfo created by this library we need to // iterate until we get to the previous head as we don't have the links in // the backwards direction: - if ( m_ourLast != oldFirst ) + if ( m_ourFirst != oldFirst ) { - for ( const wxClassInfo* info = m_ourLast; ; info = info->GetNext() ) + for ( const wxClassInfo* info = m_ourFirst; ; info = info->GetNext() ) { if ( info->GetNext() == oldFirst ) { - m_ourFirst = info; + m_ourLast = info; break; } } @@ -205,7 +206,7 @@ void wxPluginLibrary::RegisterModules() { for ( const wxClassInfo *info = m_ourFirst; ; info = info->GetNext() ) { - if( info->IsKindOf(CLASSINFO(wxModule)) ) + if( info->IsKindOf(wxCLASSINFO(wxModule)) ) { wxModule *m = wxDynamicCast(info->CreateObject(), wxModule);