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/worldentities/pawns/TeamBaseMatchBase.cc

    r10624 r10821  
    8080
    8181        std::set<WorldEntity*> attachments = this->getAttachedObjects();
    82         for (std::set<WorldEntity*>::iterator it = attachments.begin(); it != attachments.end(); ++it)
     82        for (const auto & attachment : attachments)
    8383        {
    84             if ((*it)->isA(Class(TeamColourable)))
     84            if ((attachment)->isA(Class(TeamColourable)))
    8585            {
    86                 TeamColourable* tc = orxonox_cast<TeamColourable*>(*it);
     86                TeamColourable* tc = orxonox_cast<TeamColourable*>(attachment);
    8787                tc->setTeamColour(colour);
    8888            }
Note: See TracChangeset for help on using the changeset viewer.