Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2015, 11:22:03 PM (8 years ago)
Author:
landauf
Message:

use actual types instead of 'auto'. only exception is for complicated template types, e.g. when iterating over a map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/weaponsystem/Weapon.cc

    r10821 r10916  
    6161                this->weaponPack_->removeWeapon(this);
    6262
    63             for (auto & elem : this->weaponmodes_)
    64                 elem.second->destroy();
     63            for (auto& mapEntry : this->weaponmodes_)
     64                mapEntry.second->destroy();
    6565        }
    6666    }
     
    8585    {
    8686        unsigned int i = 0;
    87         for (const auto & elem : this->weaponmodes_)
     87        for (const auto& mapEntry : this->weaponmodes_)
    8888        {
    8989            if (i == index)
    90                 return elem.second;
     90                return mapEntry.second;
    9191
    9292            ++i;
     
    136136    void Weapon::reload()
    137137    {
    138         for (auto & elem : this->weaponmodes_)
    139             elem.second->reload();
     138        for (auto& mapEntry : this->weaponmodes_)
     139            mapEntry.second->reload();
    140140    }
    141141
     
    148148    void Weapon::notifyWeaponModes()
    149149    {
    150         for (auto & elem : this->weaponmodes_)
    151             elem.second->setWeapon(this);
     150        for (auto& mapEntry : this->weaponmodes_)
     151            mapEntry.second->setWeapon(this);
    152152    }
    153153}
Note: See TracChangeset for help on using the changeset viewer.