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/Language.cc

    r10768 r10821  
    107107    Language::~Language()
    108108    {
    109         for (std::map<std::string, LanguageEntry*>::iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it)
    110             delete (it->second);
     109        for (auto & elem : this->languageEntries_)
     110            delete (elem.second);
    111111    }
    112112
     
    319319
    320320        // Iterate through the list an write the lines into the file
    321         for (std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it)
    322         {
    323             file << it->second->getLabel() << '=' << it->second->getDefault() << endl;
     321        for (const auto & elem : this->languageEntries_)
     322        {
     323            file << elem.second->getLabel() << '=' << elem.second->getDefault() << endl;
    324324        }
    325325
Note: See TracChangeset for help on using the changeset viewer.