Changeset 10821 for code/branches/cpp11_v2/src/libraries/core/module
- Timestamp:
- Nov 21, 2015, 7:05:53 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries/core/module
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/module/DynLibManager.cc
r10768 r10821 75 75 { 76 76 // Unload & delete resources in turn 77 for ( DynLibList::iterator it = mLibList.begin(); it != mLibList.end(); ++it)77 for (auto & elem : mLibList) 78 78 { 79 it->second->unload();80 delete it->second;79 elem.second->unload(); 80 delete elem.second; 81 81 } 82 82 -
code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc
r10769 r10821 59 59 { 60 60 const std::set<StaticallyInitializedInstance*>& instances = this->staticallyInitializedInstancesByType_[type]; 61 for ( std::set<StaticallyInitializedInstance*>::iterator it = instances.begin(); it != instances.end(); ++it)62 ( *it)->load();61 for (const auto & instance : instances) 62 (instance)->load(); 63 63 } 64 64 … … 75 75 std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*>> copy(this->staticallyInitializedInstancesByType_); 76 76 this->staticallyInitializedInstancesByType_.clear(); 77 for ( std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*>>::iterator it1 = copy.begin(); it1 != copy.end(); ++it1)78 for (std::set<StaticallyInitializedInstance*>::iterator it2 = it1->second.begin(); it2 != it1->second.end(); ++it2)77 for (auto & elem : copy) 78 for (std::set<StaticallyInitializedInstance*>::iterator it2 = elem.second.begin(); it2 != elem.second.end(); ++it2) 79 79 delete (*it2); 80 80 } -
code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc
r10768 r10821 59 59 ModifyConsoleCommand("PluginManager", __CC_PluginManager_unload_name).setObject(nullptr); 60 60 61 for ( std::map<std::string, PluginReference*>::iterator it = this->references_.begin(); it != this->references_.end(); ++it)62 delete it->second;63 for ( std::map<std::string, Plugin*>::iterator it = this->plugins_.begin(); it != this->plugins_.end(); ++it)64 delete it->second;61 for (auto & elem : this->references_) 62 delete elem.second; 63 for (auto & elem : this->plugins_) 64 delete elem.second; 65 65 } 66 66 … … 68 68 { 69 69 const std::vector<std::string>& pluginPaths = ApplicationPaths::getInstance().getPluginPaths(); 70 for ( std::vector<std::string>::const_iterator it = pluginPaths.begin(); it != pluginPaths.end(); ++it)70 for (auto libraryName : pluginPaths) 71 71 { 72 72 std::string name; 73 std::string libraryName = (*it);73 74 74 std::string filename = libraryName + + specialConfig::pluginExtension; 75 75 std::ifstream infile(filename.c_str()); -
code/branches/cpp11_v2/src/libraries/core/module/StaticInitializationManager.cc
r10768 r10821 50 50 { 51 51 // attention: loading a module may add new handlers to the list 52 for ( std::list<StaticInitializationHandler*>::iterator it = this->handlers_.begin(); it != this->handlers_.end(); ++it)53 ( *it)->loadModule(module);52 for (auto & elem : this->handlers_) 53 (elem)->loadModule(module); 54 54 } 55 55
Note: See TracChangeset
for help on using the changeset viewer.