- Timestamp:
- Dec 5, 2015, 10:47:51 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.cc
r10768 r10919 574 574 bool Pawn::hasSlaves() 575 575 { 576 for (ObjectList<FormationController>::iterator it = 577 ObjectList<FormationController>::begin(); 578 it != ObjectList<FormationController>::end(); ++it ) 576 for (FormationController* controller : ObjectList<FormationController>()) 579 577 { 580 578 // checks if the pawn's controller has a slave 581 if (this->hasHumanController() && it->getMaster() == this->getPlayer()->getController())579 if (this->hasHumanController() && controller->getMaster() == this->getPlayer()->getController()) 582 580 return true; 583 581 } … … 587 585 // A function that returns a slave of the pawn's controller 588 586 Controller* Pawn::getSlave(){ 589 for (ObjectList<FormationController>::iterator it = 590 ObjectList<FormationController>::begin(); 591 it != ObjectList<FormationController>::end(); ++it ) 592 { 593 if (this->hasHumanController() && it->getMaster() == this->getPlayer()->getController()) 594 return it->getController(); 587 for (FormationController* controller : ObjectList<FormationController>()) 588 { 589 if (this->hasHumanController() && controller->getMaster() == this->getPlayer()->getController()) 590 return controller->getController(); 595 591 } 596 592 return nullptr;
Note: See TracChangeset
for help on using the changeset viewer.