Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 21, 2015, 7:05:53 PM (8 years ago)
Author:
muemart
Message:

Run clang-modernize -loop-convert

  • Again, not all possible loops were converted
  • It can do pretty cool transformations, but I had to fix a few compile errors, so there might be some runtime errors lurking around too
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc

    r10768 r10821  
    5959        ModifyConsoleCommand("PluginManager", __CC_PluginManager_unload_name).setObject(nullptr);
    6060
    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;
    6565    }
    6666
     
    6868    {
    6969        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)
    7171        {
    7272            std::string name;
    73             std::string libraryName = (*it);
     73           
    7474            std::string filename = libraryName +  + specialConfig::pluginExtension;
    7575            std::ifstream infile(filename.c_str());
Note: See TracChangeset for help on using the changeset viewer.