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/weaponsystem/WeaponSet.cc

    r10768 r10821  
    6363    {
    6464        // Fire all WeaponPacks with their defined weaponmode
    65         for (std::map<WeaponPack*, unsigned int>::iterator it = this->weaponpacks_.begin(); it != this->weaponpacks_.end(); ++it)
    66             if (it->second != WeaponSystem::WEAPON_MODE_UNASSIGNED)
    67                 it->first->fire(it->second);
     65        for (auto & elem : this->weaponpacks_)
     66            if (elem.second != WeaponSystem::WEAPON_MODE_UNASSIGNED)
     67                elem.first->fire(elem.second);
    6868    }
    6969
     
    7171    {
    7272        // Reload all WeaponPacks with their defined weaponmode
    73         for (std::map<WeaponPack*, unsigned int>::iterator it = this->weaponpacks_.begin(); it != this->weaponpacks_.end(); ++it)
    74             it->first->reload();
     73        for (auto & elem : this->weaponpacks_)
     74            elem.first->reload();
    7575    }
    7676
Note: See TracChangeset for help on using the changeset viewer.