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/gametypes/TeamDeathmatch.cc

    r9941 r10821  
    6969        int winnerTeam = 0;
    7070        int highestScore = 0;
    71         for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
     71        for (auto & elem : this->players_)
    7272        {
    73             if ( this->getTeamScore(it->first) > highestScore )
     73            if ( this->getTeamScore(elem.first) > highestScore )
    7474            {
    75                 winnerTeam = this->getTeam(it->first);
    76                 highestScore = this->getTeamScore(it->first);
     75                winnerTeam = this->getTeam(elem.first);
     76                highestScore = this->getTeamScore(elem.first);
    7777            }
    7878        }
Note: See TracChangeset for help on using the changeset viewer.