- Timestamp:
- Nov 6, 2015, 10:54:34 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc
r10765 r10768 72 72 RegisterObject(FormationController); 73 73 74 this->target_ = 0;74 this->target_ = nullptr; 75 75 this->formationFlight_ = false; 76 76 this->passive_ = false; 77 77 this->maxFormationSize_ = STANDARD_MAX_FORMATION_SIZE; 78 this->myMaster_ = 0;78 this->myMaster_ = nullptr; 79 79 this->freedomCount_ = 0; 80 80 … … 104 104 { 105 105 orxout(internal_error) << this << " is still master in " << (*it) << endl; 106 it->myMaster_ = 0;106 it->myMaster_ = nullptr; 107 107 } 108 108 … … 142 142 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 143 143 { 144 Controller* controller = 0;144 Controller* controller = nullptr; 145 145 146 146 if (it->getController()) … … 173 173 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 174 174 { 175 Controller* controller = 0;175 Controller* controller = nullptr; 176 176 177 177 if (it->getController()) … … 203 203 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 204 204 { 205 Controller* controller = 0;205 Controller* controller = nullptr; 206 206 207 207 if (it->getController()) … … 230 230 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 231 231 { 232 Controller* controller = 0;232 Controller* controller = nullptr; 233 233 234 234 if (it->getController()) … … 383 383 } 384 384 385 this->myMaster_ = 0;385 this->myMaster_ = nullptr; 386 386 this->state_ = FREE; 387 387 } … … 411 411 412 412 //has it an FormationController? 413 Controller* controller = 0;413 Controller* controller = nullptr; 414 414 415 415 if (it->getController()) … … 458 458 { 459 459 this->state_ = MASTER; 460 this->myMaster_ = 0;460 this->myMaster_ = nullptr; 461 461 } 462 462 } … … 518 518 newMaster->state_ = MASTER; 519 519 newMaster->slaves_ = this->slaves_; 520 newMaster->myMaster_ = 0;520 newMaster->myMaster_ = nullptr; 521 521 522 522 for(std::vector<FormationController*>::iterator it = newMaster->slaves_.begin(); it != newMaster->slaves_.end(); it++) … … 547 547 newMaster->state_ = MASTER; 548 548 newMaster->slaves_ = this->slaves_; 549 newMaster->myMaster_ = 0;549 newMaster->myMaster_ = nullptr; 550 550 551 551 for(std::vector<FormationController*>::iterator it = newMaster->slaves_.begin(); it != newMaster->slaves_.end(); it++) … … 572 572 { 573 573 (*it)->state_ = FREE; 574 (*it)->myMaster_ = 0;574 (*it)->myMaster_ = nullptr; 575 575 } 576 576 this->slaves_.clear(); … … 629 629 630 630 //search new Master, then take lead 631 if (this->state_==FREE && this->myMaster_== 0)631 if (this->state_==FREE && this->myMaster_==nullptr) 632 632 { 633 633 searchNewMaster(); … … 654 654 (*it)->myMaster_=this; 655 655 } 656 this->myMaster_= 0;656 this->myMaster_=nullptr; 657 657 this->state_=MASTER; 658 658 } … … 779 779 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 780 780 { 781 Controller* controller = 0;781 Controller* controller = nullptr; 782 782 783 783 if (it->getController()) … … 943 943 void FormationController::forgetTarget() 944 944 { 945 this->target_ = 0;945 this->target_ = nullptr; 946 946 this->bShooting_ = false; 947 947 } … … 963 963 int team2 = entity2->getTeam(); 964 964 965 Controller* controller = 0;965 Controller* controller = nullptr; 966 966 if (entity1->getController()) 967 967 controller = entity1->getController(); … … 996 996 } 997 997 998 TeamBaseMatchBase* base = 0;998 TeamBaseMatchBase* base = nullptr; 999 999 base = orxonox_cast<TeamBaseMatchBase*>(entity1); 1000 1000 if (base) … … 1030 1030 } 1031 1031 1032 DroneController* droneController = 0;1032 DroneController* droneController = nullptr; 1033 1033 droneController = orxonox_cast<DroneController*>(entity1->getController()); 1034 1034 if (droneController && static_cast<ControllableEntity*>(droneController->getOwner()) == entity2)
Note: See TracChangeset
for help on using the changeset viewer.