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/orxonox/LevelInfo.cc

    r9667 r10821  
    107107        SubString substr = SubString(tags, ",", " "); // Split the string into tags.
    108108        const std::vector<std::string>& strings = substr.getAllStrings();
    109         for (std::vector<std::string>::const_iterator it = strings.begin(); it != strings.end(); it++)
    110             this->addTag(*it, false);
     109        for (const auto & strings_it : strings)
     110            this->addTag(strings_it, false);
    111111
    112112        this->tagsUpdated();
     
    122122        SubString substr = SubString(ships, ",", " "); // Split the string into tags.
    123123        const std::vector<std::string>& strings = substr.getAllStrings();
    124         for(std::vector<std::string>::const_iterator it = strings.begin(); it != strings.end(); it++)
    125             this->addStartingShip(*it, false);
     124        for(const auto & strings_it : strings)
     125            this->addStartingShip(strings_it, false);
    126126
    127127        this->startingshipsUpdated();
Note: See TracChangeset for help on using the changeset viewer.