X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6eccc0c485e57fe27fc56673f4f4dd191a09b2e6..30fd71e65bbbada8d17a0efbafbbbb3bafb42f9f:/src/common/dynload.cpp diff --git a/src/common/dynload.cpp b/src/common/dynload.cpp index 240c4e0c55..6e42ede2c6 100644 --- a/src/common/dynload.cpp +++ b/src/common/dynload.cpp @@ -7,7 +7,7 @@ // Created: 03/12/01 // RCS-ID: $Id$ // Copyright: (c) 2001 Ron Lee -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -279,7 +279,6 @@ void *wxDynamicLibrary::GetSymbol(const wxString &name, bool *success) const if ( !symbol ) { - wxString msg(_("wxDynamicLibrary failed to GetSymbol '%s'")); #if defined(HAVE_DLERROR) && !defined(__EMX__) #if wxUSE_UNICODE @@ -291,8 +290,7 @@ void *wxDynamicLibrary::GetSymbol(const wxString &name, bool *success) const if( err ) { - failed = TRUE; - wxLogError( msg, err ); + wxLogError(wxT("%s"), err); } #else failed = TRUE; @@ -424,6 +422,7 @@ void wxPluginLibrary::UpdateClassInfo() } } +#if wxUSE_EXTENDED_RTTI == 0 for(info = m_after; info != m_before; info = info->m_next) { if( info->m_baseClassName1 ) @@ -431,6 +430,7 @@ void wxPluginLibrary::UpdateClassInfo() if( info->m_baseClassName2 ) info->m_baseInfo2 = (wxClassInfo *)t->Get(info->m_baseClassName2); } +#endif } void wxPluginLibrary::RestoreClassInfo() @@ -477,18 +477,18 @@ void wxPluginLibrary::RegisterModules() wxASSERT_MSG( m, _T("wxDynamicCast of wxModule failed") ); - m_wxmodules.Append(m); + m_wxmodules.push_back(m); wxModule::RegisterModule(m); } } // FIXME: Likewise this is (well was) very similar to InitializeModules() - for ( wxModuleList::Node *node = m_wxmodules.GetFirst(); - node; - node = node->GetNext()) + for ( wxModuleList::iterator it = m_wxmodules.begin(); + it != m_wxmodules.end(); + ++it) { - if( !node->GetData()->Init() ) + if( !(*it)->Init() ) { wxLogDebug(_T("wxModule::Init() failed for wxPluginLibrary")); @@ -499,13 +499,14 @@ void wxPluginLibrary::RegisterModules() // let the dtor Exit the rest on shutdown, (which we'll initiate // shortly). - wxModuleList::Node *oldNode = 0; + wxModuleList::iterator oldNode = m_wxmodules.end(); do { - node = node->GetNext(); - delete oldNode; - wxModule::UnregisterModule( node->GetData() ); - oldNode = node; - } while( node ); + ++it; + if( oldNode != m_wxmodules.end() ) + m_wxmodules.erase(oldNode); + wxModule::UnregisterModule( *it ); + oldNode = it; + } while( it != m_wxmodules.end() ); --m_linkcount; // Flag us for deletion break; @@ -515,15 +516,15 @@ void wxPluginLibrary::RegisterModules() void wxPluginLibrary::UnregisterModules() { - wxModuleList::Node *node; + wxModuleList::iterator it; - for ( node = m_wxmodules.GetFirst(); node; node = node->GetNext() ) - node->GetData()->Exit(); + for ( it = m_wxmodules.begin(); it != m_wxmodules.end(); ++it ) + (*it)->Exit(); - for ( node = m_wxmodules.GetFirst(); node; node = node->GetNext() ) - wxModule::UnregisterModule( node->GetData() ); + for ( it = m_wxmodules.begin(); it != m_wxmodules.end(); ++it ) + wxModule::UnregisterModule( *it ); - m_wxmodules.DeleteContents(TRUE); + WX_CLEAR_LIST(wxModuleList, m_wxmodules); } @@ -667,7 +668,7 @@ void wxPluginManager::Unload() if ( i->second == m_entry ) { ms_manifest->erase(i); - return; + break; } }