Changeset 10733 for code/branches/cpp11_v2/src/orxonox
- Timestamp:
- Oct 31, 2015, 6:11:53 PM (9 years ago)
- Location:
- code/branches/cpp11_v2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2
- Property svn:mergeinfo changed
/code/branches/cpp11 (added) merged: 10439-10441,10443,10545
- Property svn:mergeinfo changed
-
code/branches/cpp11_v2/src/orxonox/chat/ChatManager.cc
r10624 r10733 107 107 108 108 // notify all listeners 109 for ( ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it)110 it->incomingChat(text, name);109 for (ChatListener* listener : ObjectList<ChatListener>()) 110 listener->incomingChat(text, name); 111 111 } 112 112 -
code/branches/cpp11_v2/src/orxonox/controllers/ArtificialController.cc
r10631 r10733 207 207 void ArtificialController::setAllBotLevel(float level) 208 208 { 209 for ( ObjectList<ArtificialController>::iterator it = ObjectList<ArtificialController>::begin(); it != ObjectList<ArtificialController>::end(); ++it)210 it->setBotLevel(level);209 for (ArtificialController* controller : ObjectList<ArtificialController>()) 210 controller->setBotLevel(level); 211 211 } 212 212 … … 231 231 int ArtificialController::getFiremode(std::string name) 232 232 { 233 for ( std::map< std::string, int >::iterator it = this->weaponModes_.begin(); it != this->weaponModes_.end(); ++it)234 { 235 if ( it->first == name)236 return it->second;233 for (auto firemode : this->weaponModes_) 234 { 235 if (firemode.first == name) 236 return firemode.second; 237 237 } 238 238 return -1; … … 259 259 { 260 260 WorldEntity* waypoint = NULL; 261 for ( ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it != ObjectList<WorldEntity>::end(); ++it)262 { 263 if( (*it)->getIdentifier() == ClassByString(name))261 for (WorldEntity* we : ObjectList<WorldEntity>()) 262 { 263 if(we->getIdentifier() == ClassByString(name)) 264 264 { 265 265 ControllableEntity* controllable = this->getControllableEntity(); 266 266 if(!controllable) continue; 267 float actualDistance = ( (*it)->getPosition() - controllable->getPosition() ).length();267 float actualDistance = ( we->getPosition() - controllable->getPosition() ).length(); 268 268 if(actualDistance > searchDistance || actualDistance < 5.0f) continue; 269 269 // TODO: PickupSpawner: adjust waypoint accuracy to PickupSpawner's triggerdistance … … 271 271 else 272 272 { 273 waypoint = *it;273 waypoint = we; 274 274 break; 275 275 }
Note: See TracChangeset
for help on using the changeset viewer.