Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 6, 2015, 10:54:34 PM (8 years ago)
Author:
landauf
Message:

replace '0' by 'nullptr'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc

    r10765 r10768  
    7272        RegisterObject(FormationController);
    7373
    74         this->target_ = 0;
     74        this->target_ = nullptr;
    7575        this->formationFlight_ = false;
    7676        this->passive_ = false;
    7777        this->maxFormationSize_ = STANDARD_MAX_FORMATION_SIZE;
    78         this->myMaster_ = 0;
     78        this->myMaster_ = nullptr;
    7979        this->freedomCount_ = 0;
    8080
     
    104104                    {
    105105                        orxout(internal_error) << this << " is still master in " << (*it) << endl;
    106                         it->myMaster_ = 0;
     106                        it->myMaster_ = nullptr;
    107107                    }
    108108
     
    142142        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
    143143        {
    144             Controller* controller = 0;
     144            Controller* controller = nullptr;
    145145
    146146            if (it->getController())
     
    173173        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
    174174        {
    175             Controller* controller = 0;
     175            Controller* controller = nullptr;
    176176
    177177            if (it->getController())
     
    203203        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
    204204        {
    205             Controller* controller = 0;
     205            Controller* controller = nullptr;
    206206
    207207            if (it->getController())
     
    230230        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
    231231        {
    232             Controller* controller = 0;
     232            Controller* controller = nullptr;
    233233
    234234            if (it->getController())
     
    383383        }
    384384
    385         this->myMaster_ = 0;
     385        this->myMaster_ = nullptr;
    386386        this->state_ = FREE;
    387387    }
     
    411411
    412412            //has it an FormationController?
    413             Controller* controller = 0;
     413            Controller* controller = nullptr;
    414414
    415415            if (it->getController())
     
    458458        {
    459459            this->state_ = MASTER;
    460             this->myMaster_ = 0;
     460            this->myMaster_ = nullptr;
    461461        }
    462462    }
     
    518518            newMaster->state_ = MASTER;
    519519            newMaster->slaves_ = this->slaves_;
    520             newMaster->myMaster_ = 0;
     520            newMaster->myMaster_ = nullptr;
    521521
    522522            for(std::vector<FormationController*>::iterator it = newMaster->slaves_.begin(); it != newMaster->slaves_.end(); it++)
     
    547547                newMaster->state_ = MASTER;
    548548                newMaster->slaves_ = this->slaves_;
    549                 newMaster->myMaster_ = 0;
     549                newMaster->myMaster_ = nullptr;
    550550
    551551                for(std::vector<FormationController*>::iterator it = newMaster->slaves_.begin(); it != newMaster->slaves_.end(); it++)
     
    572572        {
    573573            (*it)->state_ = FREE;
    574             (*it)->myMaster_ = 0;
     574            (*it)->myMaster_ = nullptr;
    575575        }
    576576        this->slaves_.clear();
     
    629629
    630630        //search new Master, then take lead
    631         if (this->state_==FREE && this->myMaster_==0)
     631        if (this->state_==FREE && this->myMaster_==nullptr)
    632632        {
    633633          searchNewMaster();
     
    654654                 (*it)->myMaster_=this;
    655655            }
    656             this->myMaster_=0;
     656            this->myMaster_=nullptr;
    657657            this->state_=MASTER;
    658658        }
     
    779779        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
    780780        {
    781             Controller* controller = 0;
     781            Controller* controller = nullptr;
    782782
    783783            if (it->getController())
     
    943943    void FormationController::forgetTarget()
    944944    {
    945         this->target_ = 0;
     945        this->target_ = nullptr;
    946946        this->bShooting_ = false;
    947947    }
     
    963963        int team2 = entity2->getTeam();
    964964
    965         Controller* controller = 0;
     965        Controller* controller = nullptr;
    966966        if (entity1->getController())
    967967            controller = entity1->getController();
     
    996996        }
    997997
    998         TeamBaseMatchBase* base = 0;
     998        TeamBaseMatchBase* base = nullptr;
    999999        base = orxonox_cast<TeamBaseMatchBase*>(entity1);
    10001000        if (base)
     
    10301030        }
    10311031
    1032         DroneController* droneController = 0;
     1032        DroneController* droneController = nullptr;
    10331033        droneController = orxonox_cast<DroneController*>(entity1->getController());
    10341034        if (droneController && static_cast<ControllableEntity*>(droneController->getOwner()) == entity2)
Note: See TracChangeset for help on using the changeset viewer.