Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 22, 2009, 10:05:38 PM (14 years ago)
Author:
rgrieder
Message:

Replaced (*it). with it→ where I could find it. Should increased code readability.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/orxonox/pickup/PickupCollection.cc

    r5781 r6400  
    100100        for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++)
    101101        {
    102             if((*it).second && (*it).second->getOwner())
    103                 (*it).second->dropped((*it).second->getOwner());
     102            if(it->second && it->second->getOwner())
     103                it->second->dropped(it->second->getOwner());
    104104        }
    105105        this->currentUsable_ = NULL;
     
    124124            for (std::multimap<std::string, BaseItem*>::iterator it = bounds.first; it != bounds.second && it != this->items_.end(); it++)
    125125            {
    126                 if ((*it).second == item)
     126                if (it->second == item)
    127127                {
    128128                    return true;
     
    176176            for (std::multimap<std::string, BaseItem*>::iterator it = bounds.first; it != bounds.second && it != this->items_.end(); it++)
    177177            {
    178                 if ((*it).second == item)
     178                if (it->second == item)
    179179                {
    180180                    this->items_.erase(it);
     
    217217        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
    218218        {
    219             v += (*it).second;
     219            v += it->second;
    220220        }
    221221
     
    232232        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++)
    233233        {
    234             if ((*it).second == value)
     234            if (it->second == value)
    235235            {
    236236                this->additiveModifiers_.erase(it);
     
    260260        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
    261261        {
    262             v *= (*it).second;
     262            v *= it->second;
    263263        }
    264264
     
    275275        for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++)
    276276        {
    277             if ((*it).second == value)
     277            if (it->second == value)
    278278            {
    279279                this->multiplicativeModifiers_.erase(it);
     
    335335        for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++)
    336336        {
    337             if ((*it).second->isA(ident))
    338                 ret.push_back(orxonox_cast<EquipmentItem*>((*it).second));
     337            if (it->second->isA(ident))
     338                ret.push_back(orxonox_cast<EquipmentItem*>(it->second));
    339339        }
    340340
     
    352352        for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++)
    353353        {
    354             if ((*it).second->isA(ident))
    355                 ret.push_back(orxonox_cast<PassiveItem*>((*it).second));
     354            if (it->second->isA(ident))
     355                ret.push_back(orxonox_cast<PassiveItem*>(it->second));
    356356        }
    357357
     
    369369        for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++)
    370370        {
    371             if ((*it).second->isA(ident))
    372                 ret.push_back(orxonox_cast<UsableItem*>((*it).second));
     371            if (it->second->isA(ident))
     372                ret.push_back(orxonox_cast<UsableItem*>(it->second));
    373373        }
    374374
Note: See TracChangeset for help on using the changeset viewer.