Changeset 6400 for code/branches/presentation2/src/orxonox/pickup
- Timestamp:
- Dec 22, 2009, 10:05:38 PM (15 years ago)
- Location:
- code/branches/presentation2/src/orxonox/pickup
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/pickup/ModifierPickup.cc
r5929 r6400 91 91 for (it = this->additiveModifiers_.begin(); it != this->additiveModifiers_.end(); it++) 92 92 { 93 pawn->getPickups().addAdditiveModifier( (*it).first, (*it).second);93 pawn->getPickups().addAdditiveModifier(it->first, it->second); 94 94 } 95 95 96 96 for (it = this->multiplicativeModifiers_.begin(); it != this->multiplicativeModifiers_.end(); it++) 97 97 { 98 pawn->getPickups().addMultiplicativeModifier( (*it).first, (*it).second);98 pawn->getPickups().addMultiplicativeModifier(it->first, it->second); 99 99 } 100 100 … … 128 128 for (it = this->additiveModifiers_.begin(); it != this->additiveModifiers_.end(); it++) 129 129 { 130 pawn->getPickups().removeAdditiveModifier( (*it).first, (*it).second);130 pawn->getPickups().removeAdditiveModifier(it->first, it->second); 131 131 } 132 132 133 133 for (it = this->multiplicativeModifiers_.begin(); it != this->multiplicativeModifiers_.end(); it++) 134 134 { 135 pawn->getPickups().removeMultiplicativeModifier( (*it).first, (*it).second);135 pawn->getPickups().removeMultiplicativeModifier(it->first, it->second); 136 136 } 137 137 … … 162 162 std::map<ModifierType::Value, float>::const_iterator it = this->additiveModifiers_.find(type); 163 163 if (it != this->additiveModifiers_.end()) 164 return (*it).second;164 return it->second; 165 165 else 166 166 return 0.0f; … … 175 175 std::map<ModifierType::Value, float>::const_iterator it = this->multiplicativeModifiers_.find(type); 176 176 if (it != this->multiplicativeModifiers_.end()) 177 return (*it).second;177 return it->second; 178 178 else 179 179 return 1.0f; -
code/branches/presentation2/src/orxonox/pickup/PickupCollection.cc
r5781 r6400 100 100 for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++) 101 101 { 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()); 104 104 } 105 105 this->currentUsable_ = NULL; … … 124 124 for (std::multimap<std::string, BaseItem*>::iterator it = bounds.first; it != bounds.second && it != this->items_.end(); it++) 125 125 { 126 if ( (*it).second == item)126 if (it->second == item) 127 127 { 128 128 return true; … … 176 176 for (std::multimap<std::string, BaseItem*>::iterator it = bounds.first; it != bounds.second && it != this->items_.end(); it++) 177 177 { 178 if ( (*it).second == item)178 if (it->second == item) 179 179 { 180 180 this->items_.erase(it); … … 217 217 for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++) 218 218 { 219 v += (*it).second;219 v += it->second; 220 220 } 221 221 … … 232 232 for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->additiveModifiers_.end(); it++) 233 233 { 234 if ( (*it).second == value)234 if (it->second == value) 235 235 { 236 236 this->additiveModifiers_.erase(it); … … 260 260 for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++) 261 261 { 262 v *= (*it).second;262 v *= it->second; 263 263 } 264 264 … … 275 275 for (std::multimap<ModifierType::Value, float>::iterator it = range.first; it != range.second && it != this->multiplicativeModifiers_.end(); it++) 276 276 { 277 if ( (*it).second == value)277 if (it->second == value) 278 278 { 279 279 this->multiplicativeModifiers_.erase(it); … … 335 335 for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++) 336 336 { 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)); 339 339 } 340 340 … … 352 352 for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++) 353 353 { 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)); 356 356 } 357 357 … … 369 369 for (std::multimap<std::string, BaseItem*>::iterator it = this->items_.begin(); it != this->items_.end(); it++) 370 370 { 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)); 373 373 } 374 374
Note: See TracChangeset
for help on using the changeset viewer.