Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

replace '0' by 'nullptr'

Location:
code/branches/cpp11_v2/src/orxonox/controllers
Files:
7 edited

Legend:

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

    r10765 r10768  
    177177            {
    178178                this->weaponModes_.clear(); // reset previous weapon information
    179                 WeaponSlot* wSlot = 0;
     179                WeaponSlot* wSlot = nullptr;
    180180                for(int l=0; (wSlot = pawn->getWeaponSlot(l)) ; l++)
    181181                {
    182                     WeaponMode* wMode = 0;
     182                    WeaponMode* wMode = nullptr;
    183183                    for(int i=0; (wMode = wSlot->getWeapon()->getWeaponmode(i)) ; i++)
    184184                    {
     
    249249            return this->waypoints_[index];
    250250        else
    251             return 0;
     251            return nullptr;
    252252    }
    253253
  • code/branches/cpp11_v2/src/orxonox/controllers/Controller.cc

    r9797 r10768  
    4040        RegisterObject(Controller);
    4141
    42         this->player_ = 0;
    43         this->controllableEntity_ = 0;
     42        this->player_ = nullptr;
     43        this->controllableEntity_ = nullptr;
    4444        this->bGodMode_ = false;
    4545        this->team_=-1;
  • code/branches/cpp11_v2/src/orxonox/controllers/DroneController.cc

    r9667 r10768  
    4949        RegisterObject(DroneController);
    5050
    51         this->owner_ = 0;
    52         this->drone_ = 0;
     51        this->owner_ = nullptr;
     52        this->drone_ = nullptr;
    5353        this->isShooting_ = false;
    5454        this->setAccuracy(10);
  • 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)
  • code/branches/cpp11_v2/src/orxonox/controllers/HumanController.cc

    r10765 r10768  
    6565    RegisterUnloadableClass(HumanController);
    6666
    67     HumanController* HumanController::localController_s = 0;
     67    HumanController* HumanController::localController_s = nullptr;
    6868
    6969    HumanController::HumanController(Context* context) : FormationController(context)
     
    8181            HumanController::localController_s->removeFromFormation();
    8282        }
    83         HumanController::localController_s = 0;
     83        HumanController::localController_s = nullptr;
    8484    }
    8585
  • code/branches/cpp11_v2/src/orxonox/controllers/NewHumanController.cc

    r10765 r10768  
    5858    RegisterUnloadableClass(NewHumanController);
    5959
    60     NewHumanController* NewHumanController::localController_s = 0;
     60    NewHumanController* NewHumanController::localController_s = nullptr;
    6161
    6262    NewHumanController::NewHumanController(Context* context)
     
    445445            pawn->setAimPosition( mouseRay.getOrigin() + mouseRay.getDirection() * 3000 );
    446446
    447         if( this->getControllableEntity() && this->getControllableEntity()->getTarget() != 0 )
    448             this->getControllableEntity()->setTarget( 0 );
     447        if( this->getControllableEntity() && this->getControllableEntity()->getTarget() != nullptr )
     448            this->getControllableEntity()->setTarget( nullptr );
    449449
    450450        //return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getWorldOrientation() * Vector3::NEGATIVE_UNIT_Z * 2000);
  • code/branches/cpp11_v2/src/orxonox/controllers/WaypointPatrolController.cc

    r9716 r10768  
    101101
    102102        if (shortestsqdistance > (this->alertnessradius_ * this->alertnessradius_))
    103             this->target_ = 0;
     103            this->target_ = nullptr;
    104104    }
    105105}
Note: See TracChangeset for help on using the changeset viewer.