Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 4, 2015, 10:25:42 PM (9 years ago)
Author:
landauf
Message:

replace 'NULL' by 'nullptr'

Location:
code/branches/cpp11_v2/src/modules
Files:
93 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/modules/designtools/ScreenshotManager.cc

    r10624 r10765  
    6969        Constructor.
    7070    */
    71     ScreenshotManager::ScreenshotManager() : finalPicturePB_(NULL), data_(NULL)
     71    ScreenshotManager::ScreenshotManager() : finalPicturePB_(nullptr), data_(nullptr)
    7272    {
    7373        RegisterObject(ScreenshotManager);
     
    9090    void ScreenshotManager::cleanup(void)
    9191    {
    92         if(this->finalPicturePB_ != NULL)
     92        if(this->finalPicturePB_ != nullptr)
    9393        {
    9494            delete this->finalPicturePB_;
    95             this->finalPicturePB_ = NULL;
    96         }
    97         if(this->data_ != NULL)
     95            this->finalPicturePB_ = nullptr;
     96        }
     97        if(this->data_ != nullptr)
    9898        {
    9999            delete this->data_;
    100             this->data_ = NULL;
     100            this->data_ = nullptr;
    101101        }
    102102        if(!this->tempTexture_.isNull())
     
    151151        // Get the screenshot.
    152152        Ogre::Image* finalImage = getScreenshot();
    153         if(finalImage != NULL)
     153        if(finalImage != nullptr)
    154154        {
    155155            // Save it.
     
    173173    Ogre::Image* ScreenshotManager::getScreenshot()
    174174    {
    175         if(CameraManager::getInstance().getActiveCamera() == NULL )
    176             return NULL;
     175        if(CameraManager::getInstance().getActiveCamera() == nullptr )
     176            return nullptr;
    177177        return this->getScreenshot(CameraManager::getInstance().getActiveCamera()->getOgreCamera());
    178178    }
     
    189189    Ogre::Image* ScreenshotManager::getScreenshot(Ogre::Camera* camera)
    190190    {
    191         if(camera == NULL)
    192             return NULL;
     191        if(camera == nullptr)
     192            return nullptr;
    193193       
    194194        // Update the internal parameters.
  • code/branches/cpp11_v2/src/modules/designtools/SkyboxGenerator.cc

    r10624 r10765  
    146146            }
    147147
    148             ControllableEntity* entity = NULL;
    149             if(HumanController::getLocalControllerSingleton() != NULL && HumanController::getLocalControllerSingleton()->getControllableEntity() != NULL)
     148            ControllableEntity* entity = nullptr;
     149            if(HumanController::getLocalControllerSingleton() != nullptr && HumanController::getLocalControllerSingleton()->getControllableEntity() != nullptr)
    150150                entity = HumanController::getLocalControllerSingleton()->getControllableEntity();
    151151            else
  • code/branches/cpp11_v2/src/modules/docking/Dock.cc

    r10624 r10765  
    8787
    8888        PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
    89         PlayerInfo* player = NULL;
     89        PlayerInfo* player = nullptr;
    9090
    9191        // Check whether it is a player trigger and extract pawn from it
    92         if(pTrigger != NULL)
     92        if(pTrigger != nullptr)
    9393        {
    9494            if(!pTrigger->isForPlayer()) {  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
     
    103103            return false;
    104104        }
    105         if(player == NULL)
     105        if(player == nullptr)
    106106        {
    107107            orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl;
     
    131131    {
    132132        PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
    133         PlayerInfo* player = NULL;
     133        PlayerInfo* player = nullptr;
    134134
    135135        // Check whether it is a player trigger and extract pawn from it
    136         if(pTrigger != NULL)
     136        if(pTrigger != nullptr)
    137137        {
    138138            if(!pTrigger->isForPlayer()) {  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
     
    147147            return false;
    148148        }
    149         if(player == NULL)
     149        if(player == nullptr)
    150150        {
    151151            orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl;
     
    315315            }
    316316        }
    317         return NULL;
     317        return nullptr;
    318318    }
    319319
     
    333333            i--;
    334334        }
    335         return NULL;
     335        return nullptr;
    336336    }
    337337
     
    352352            i--;
    353353        }
    354         return NULL;
     354        return nullptr;
    355355    }
    356356}
  • code/branches/cpp11_v2/src/modules/docking/DockToShip.cc

    r9974 r10765  
    7272
    7373        DockingTarget *target = DockingEffect::findTarget(this->target_);
    74         if (target == NULL) {
     74        if (target == nullptr) {
    7575            orxout(internal_warning, context::docking) << "Can't retrieve target for '" << this->target_ << "'.." << endl;
    7676            return false;
     
    7878
    7979        ControllableEntity *dockTo = (ControllableEntity*) target->getParent();
    80         if (dockTo == NULL) {
     80        if (dockTo == nullptr) {
    8181            orxout(internal_warning, context::docking) << "Parent is not a ControllableEntity.." << endl;
    8282            return false;
  • code/branches/cpp11_v2/src/modules/docking/DockingAnimation.cc

    r10624 r10765  
    4545        RegisterObject(DockingAnimation);
    4646
    47         this->parent_ = NULL;
     47        this->parent_ = nullptr;
    4848    }
    4949
  • code/branches/cpp11_v2/src/modules/docking/DockingController.cc

    r9667 r10765  
    4444        RegisterObject(DockingController);
    4545
    46         this->dock_ = NULL;
    47         this->player_ = NULL;
    48         this->entity_ = NULL;
     46        this->dock_ = nullptr;
     47        this->player_ = nullptr;
     48        this->entity_ = nullptr;
    4949    }
    5050
     
    122122        this->player_->startControl(this->entity_);
    123123        this->setActive(false);
    124         this->controllableEntity_ = NULL;
     124        this->controllableEntity_ = nullptr;
    125125
    126126        if (this->docking_)
  • code/branches/cpp11_v2/src/modules/docking/DockingEffect.cc

    r10624 r10765  
    7070                return (*it);
    7171        }
    72         return NULL;
     72        return nullptr;
    7373    }
    7474}
  • code/branches/cpp11_v2/src/modules/dodgerace/DodgeRace.cc

    r10624 r10765  
    6767    {
    6868        level++;
    69         if (getPlayer() != NULL)
     69        if (getPlayer() != nullptr)
    7070        {
    7171            for (int i = 0; i < 7; i++)
     
    8585    void DodgeRace::tick(float dt)
    8686    {
    87         if (getPlayer() != NULL)
     87        if (getPlayer() != nullptr)
    8888        {
    8989            currentPosition = getPlayer()->getWorldPosition().x;
     
    134134    DodgeRaceShip* DodgeRace::getPlayer()
    135135    {
    136         if (player == NULL)
     136        if (player == nullptr)
    137137        {
    138138            for (ObjectList<DodgeRaceShip>::iterator it = ObjectList<DodgeRaceShip>::begin(); it != ObjectList<DodgeRaceShip>::end(); ++it)
     
    173173        this->bForceSpawn_ = false;
    174174
    175         if (this->center_ == NULL)  // abandon mission!
     175        if (this->center_ == nullptr)  // abandon mission!
    176176        {
    177177            orxout(internal_error) << "DodgeRace: No Centerpoint specified." << endl;
  • code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceCenterPoint.cc

    r10624 r10765  
    5656    void DodgeRaceCenterPoint::checkGametype()
    5757    {
    58         if (this->getGametype() != NULL && this->getGametype()->isA(Class(DodgeRace)))
     58        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(DodgeRace)))
    5959        {
    6060            DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype());
  • code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceShip.cc

    r10624 r10765  
    9191        // Camera
    9292        Camera* camera = this->getCamera();
    93         if (camera != NULL)
     93        if (camera != nullptr)
    9494        {
    9595            // camera->setPosition(Vector3(-pos.z, -posforeward, 0));
     
    152152    DodgeRace* DodgeRaceShip::getGame()
    153153    {
    154         if (game == NULL)
     154        if (game == nullptr)
    155155        {
    156156            for (ObjectList<DodgeRace>::iterator it = ObjectList<DodgeRace>::begin(); it != ObjectList<DodgeRace>::end(); ++it)
  • code/branches/cpp11_v2/src/modules/gametypes/RaceCheckPoint.cc

    r9973 r10765  
    125125            }
    126126        }
    127         return NULL;
     127        return nullptr;
    128128    }
    129129
  • code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceController.cc

    r10318 r10765  
    9898                    RaceCheckPoint* point2 = findCheckpoint((*numb));
    9999
    100                     //if(point2 != NULL)
     100                    //if(point2 != nullptr)
    101101                    //placeVirtualCheckpoints((*it), point2);
    102102                }
     
    126126        staticRacePoints_ = findStaticCheckpoints(nextRaceCheckpoint_, checkpoints);
    127127        // initialisation of currentRaceCheckpoint_
    128         currentRaceCheckpoint_ = NULL;
     128        currentRaceCheckpoint_ = nullptr;
    129129
    130130        int i;
    131         for (i = -2; findCheckpoint(i) != NULL; i--)
     131        for (i = -2; findCheckpoint(i) != nullptr; i--)
    132132        {
    133133            continue;
     
    194194                    continue;
    195195                }
    196                 if (findCheckpoint(*it) == NULL)
     196                if (findCheckpoint(*it) == nullptr)
    197197                    orxout(internal_warning) << "Problematic Point: " << (*it) << endl;
    198198                else
     
    209209    float SpaceRaceController::distanceSpaceshipToCheckPoint(RaceCheckPoint* CheckPoint)
    210210    {
    211         if (this->getControllableEntity() != NULL)
     211        if (this->getControllableEntity() != nullptr)
    212212        {
    213213            return (CheckPoint->getPosition()- this->getControllableEntity()->getPosition()).length();
     
    223223    {
    224224        float minDistance = 0;
    225         RaceCheckPoint* minNextRaceCheckPoint = NULL;
     225        RaceCheckPoint* minNextRaceCheckPoint = nullptr;
    226226
    227227        // find the next checkpoint with the minimal distance
     
    231231            float distance = recCalculateDistance(nextRaceCheckPoint, this->getControllableEntity()->getPosition());
    232232
    233             if (distance < minDistance || minNextRaceCheckPoint == NULL)
     233            if (distance < minDistance || minNextRaceCheckPoint == nullptr)
    234234            {
    235235                minDistance = distance;
     
    271271    RaceCheckPoint* SpaceRaceController::adjustNextPoint()
    272272    {
    273         if (currentRaceCheckpoint_ == NULL) // no Adjust possible
     273        if (currentRaceCheckpoint_ == nullptr) // no Adjust possible
    274274
    275275        {
     
    292292            if (this->checkpoints_[i]->getCheckpointIndex() == index)
    293293                return this->checkpoints_[i];
    294         return NULL;
     294        return nullptr;
    295295    }
    296296
     
    347347    void SpaceRaceController::tick(float dt)
    348348    {
    349         if (this->getControllableEntity() == NULL || this->getControllableEntity()->getPlayer() == NULL )
     349        if (this->getControllableEntity() == nullptr || this->getControllableEntity()->getPlayer() == nullptr )
    350350        {
    351351            //orxout()<< this->getControllableEntity() << " in tick"<<endl;
     
    419419            {
    420420                btCollisionShape* currentShape = (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape();
    421                 if(currentShape == NULL)
     421                if(currentShape == nullptr)
    422422                continue;
    423423
     
    447447            {
    448448                btCollisionShape* currentShape = (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape();
    449                 if(currentShape == NULL)
     449                if(currentShape == nullptr)
    450450                continue;
    451451
     
    491491        {
    492492
    493             if (dynamic_cast<RaceCheckPoint*>(*it) != NULL)
     493            if (dynamic_cast<RaceCheckPoint*>(*it) != nullptr)
    494494            {
    495495                continue;
     
    537537        //                    btVector3 positionObject;
    538538        //                    btScalar radiusObject;
    539         //                    if((*it)==NULL)
     539        //                    if((*it)==nullptr)
    540540        //                    {   orxout()<<"Problempoint 1.1"<<endl; continue;}
    541541        //                    //TODO: Probably it points on a wrong object
    542542        //                    for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!=0; everyShape++)
    543543        //                    {
    544         //                        if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==NULL)
     544        //                        if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==nullptr)
    545545        //                        {    continue;}
    546546        //
     
    570570        //                        btVector3 positionObject;
    571571        //                        btScalar radiusObject;
    572         //                        if((*it)==NULL)
     572        //                        if((*it)==nullptr)
    573573        //                        {   orxout()<<"Problempoint 1"<<endl; continue;}
    574574        //                        for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!=0; everyShape++)
    575575        //                        {
    576         //                            if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==NULL)
     576        //                            if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==nullptr)
    577577        //                            {   orxout()<<"Problempoint 2.2"<<endl; continue;}
    578578        //                            (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()->getBoundingSphere(positionObject,radiusObject);
  • code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceManager.cc

    r10624 r10765  
    7171        this->players_ = this->race_->getPlayers();
    7272
    73         if (this->checkpoints_[0] != NULL && !this->firstcheckpointvisible_)
     73        if (this->checkpoints_[0] != nullptr && !this->firstcheckpointvisible_)
    7474        {
    7575            this->checkpoints_[0]->setRadarVisibility(true);
     
    121121    bool SpaceRaceManager::reachedValidCheckpoint(RaceCheckPoint* oldCheckpoint, RaceCheckPoint* newCheckpoint, PlayerInfo* player) const
    122122    {
    123         if (oldCheckpoint != NULL)
     123        if (oldCheckpoint != nullptr)
    124124        {
    125125            // the player already visited an old checkpoint; see which checkpoints are possible now
  • code/branches/cpp11_v2/src/modules/invader/Invader.cc

    r10733 r10765  
    7878    {
    7979        level++;
    80         if (getPlayer() != NULL)
     80        if (getPlayer() != nullptr)
    8181        {
    8282            for (int i = 0; i < 7; i++)
     
    9696    InvaderShip* Invader::getPlayer()
    9797    {
    98         if (player == NULL)
     98        if (player == nullptr)
    9999        {
    100100            for (ObjectList<InvaderShip>::iterator it = ObjectList<InvaderShip>::begin(); it != ObjectList<InvaderShip>::end(); ++it)
     
    106106    void Invader::spawnEnemy()
    107107    {
    108         if (getPlayer() == NULL)
     108        if (getPlayer() == nullptr)
    109109            return;
    110110
     
    158158        this->bForceSpawn_ = true;
    159159
    160         if (this->center_ == NULL)  // abandon mission!
     160        if (this->center_ == nullptr)  // abandon mission!
    161161        {
    162162            orxout(internal_error) << "Invader: No Centerpoint specified." << endl;
  • code/branches/cpp11_v2/src/modules/invader/InvaderCenterPoint.cc

    r10624 r10765  
    5656    void InvaderCenterPoint::checkGametype()
    5757    {
    58         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Invader)))
     58        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Invader)))
    5959        {
    6060            Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype());
  • code/branches/cpp11_v2/src/modules/invader/InvaderEnemy.cc

    r10733 r10765  
    5656            removeHealth(2000);
    5757
    58         if (player != NULL)
     58        if (player != nullptr)
    5959        {
    6060            float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * (player->getPosition().z - getPosition().z);
     
    7373    Invader* InvaderEnemy::getGame()
    7474    {
    75         if (game == NULL)
     75        if (game == nullptr)
    7676        {
    7777            for (ObjectList<Invader>::iterator it = ObjectList<Invader>::begin(); it != ObjectList<Invader>::end(); ++it)
     
    8484    {
    8585        Pawn::damage(damage, healthdamage, shielddamage, originator, cs);
    86         if (getGame() && orxonox_cast<InvaderShip*>(originator) != NULL && getHealth() <= 0)
     86        if (getGame() && orxonox_cast<InvaderShip*>(originator) != nullptr && getHealth() <= 0)
    8787            getGame()->addPoints(42);
    8888    }
  • code/branches/cpp11_v2/src/modules/invader/InvaderEnemyShooter.cc

    r10733 r10765  
    5959            removeHealth(2000);
    6060
    61         if (player != NULL)
     61        if (player != nullptr)
    6262        {
    6363            float distPlayer = player->getPosition().z - getPosition().z;
     
    7777    {
    7878        Pawn::damage(damage, healthdamage, shielddamage, originator, cs);
    79         if (getGame() && orxonox_cast<InvaderShip*>(originator) != NULL && getHealth() <= 0)
     79        if (getGame() && orxonox_cast<InvaderShip*>(originator) != nullptr && getHealth() <= 0)
    8080            getGame()->addPoints(3*42);
    8181    }
  • code/branches/cpp11_v2/src/modules/invader/InvaderShip.cc

    r10733 r10765  
    9595        // Camera
    9696        Camera* camera = this->getCamera();
    97         if (camera != NULL)
     97        if (camera != nullptr)
    9898        {
    9999            camera->setPosition(Vector3(-pos.z, -posforeward, 0));
     
    154154        Projectile* shot = orxonox_cast<Projectile*>(otherObject);
    155155        // ensure that this gets only called once per enemy.
    156         if (enemy != NULL && lastEnemy != enemy)
     156        if (enemy != nullptr && lastEnemy != enemy)
    157157        {
    158158            lastEnemy = enemy;
     
    165165        }
    166166        // was shot, decrease multiplier
    167         else if (shot != NULL  && lastShot != shot)
     167        else if (shot != nullptr  && lastShot != shot)
    168168        {
    169             if (getGame() && orxonox_cast<InvaderEnemy*>(shot->getShooter()) != NULL)
     169            if (getGame() && orxonox_cast<InvaderEnemy*>(shot->getShooter()) != nullptr)
    170170            {
    171171                if (getGame()->multiplier > 1)
     
    182182    Invader* InvaderShip::getGame()
    183183    {
    184         if (game == NULL)
     184        if (game == nullptr)
    185185        {
    186186            for (ObjectList<Invader>::iterator it = ObjectList<Invader>::begin(); it != ObjectList<Invader>::end(); ++it)
  • code/branches/cpp11_v2/src/modules/jump/Jump.cc

    r10733 r10765  
    8383        SUPER(Jump, tick, dt);
    8484
    85         if (figure_ != NULL)
     85        if (figure_ != nullptr)
    8686        {
    8787            Vector3 figurePosition = figure_->getPosition();
     
    130130
    131131
    132             if (camera != NULL)
     132            if (camera != nullptr)
    133133            {
    134134                Vector3 cameraPosition = Vector3(0, totalScreenShift_, 0);
     
    275275    void Jump::start()
    276276    {
    277         if (center_ != NULL) // There needs to be a JumpCenterpoint, i.e. the area the game takes place.
    278         {
    279             if (figure_ == NULL)
     277        if (center_ != nullptr) // There needs to be a JumpCenterpoint, i.e. the area the game takes place.
     278        {
     279            if (figure_ == nullptr)
    280280            {
    281281                figure_ = new JumpFigure(center_->getContext());
     
    298298        Deathmatch::start();
    299299
    300         if (figure_ != NULL)
     300        if (figure_ != nullptr)
    301301        {
    302302            camera = figure_->getCamera();
     
    325325        assert(player);
    326326
    327         if (figure_->getPlayer() == NULL)
     327        if (figure_->getPlayer() == nullptr)
    328328        {
    329329            player->startControl(figure_);
     
    334334    PlayerInfo* Jump::getPlayer() const
    335335    {
    336         if (this->figure_ != NULL)
     336        if (this->figure_ != nullptr)
    337337        {
    338338            return this->figure_->getPlayer();
     
    346346    void Jump::addPlatform(JumpPlatform* newPlatform, std::string platformTemplate, float xPosition, float zPosition)
    347347    {
    348         if (newPlatform != NULL && center_ != NULL)
     348        if (newPlatform != nullptr && center_ != nullptr)
    349349        {
    350350            newPlatform->addTemplate(platformTemplate);
     
    414414    {
    415415        JumpProjectile* newProjectile = new JumpProjectile(center_->getContext());
    416         if (newProjectile != NULL && center_ != NULL)
     416        if (newProjectile != nullptr && center_ != nullptr)
    417417        {
    418418            newProjectile->addTemplate(center_->getProjectileTemplate());
     
    427427    {
    428428        JumpSpring* newSpring = new JumpSpring(center_->getContext());
    429         if (newSpring != NULL && center_ != NULL)
     429        if (newSpring != nullptr && center_ != nullptr)
    430430        {
    431431            newSpring->addTemplate(center_->getSpringTemplate());
     
    440440    {
    441441        JumpSpring* newSpring = new JumpSpring(center_->getContext());
    442         if (newSpring != NULL && center_ != NULL)
     442        if (newSpring != nullptr && center_ != nullptr)
    443443        {
    444444            newSpring->addTemplate(center_->getSpringTemplate());
     
    453453    {
    454454        JumpRocket* newRocket = new JumpRocket(center_->getContext());
    455         if (newRocket != NULL && center_ != NULL)
     455        if (newRocket != nullptr && center_ != nullptr)
    456456        {
    457457            newRocket->addTemplate(center_->getRocketTemplate());
     
    466466    {
    467467        JumpRocket* newRocket = new JumpRocket(center_->getContext());
    468         if (newRocket != NULL && center_ != NULL)
     468        if (newRocket != nullptr && center_ != nullptr)
    469469        {
    470470            newRocket->addTemplate(center_->getRocketTemplate());
     
    479479    {
    480480        JumpPropeller* newPropeller = new JumpPropeller(center_->getContext());
    481         if (newPropeller != NULL && center_ != NULL)
     481        if (newPropeller != nullptr && center_ != nullptr)
    482482        {
    483483            newPropeller->addTemplate(center_->getPropellerTemplate());
     
    492492    {
    493493        JumpPropeller* newPropeller = new JumpPropeller(center_->getContext());
    494         if (newPropeller != NULL && center_ != NULL)
     494        if (newPropeller != nullptr && center_ != nullptr)
    495495        {
    496496            newPropeller->addTemplate(center_->getPropellerTemplate());
     
    505505    {
    506506        JumpBoots* newBoots = new JumpBoots(center_->getContext());
    507         if (newBoots != NULL && center_ != NULL)
     507        if (newBoots != nullptr && center_ != nullptr)
    508508        {
    509509            newBoots->addTemplate(center_->getBootsTemplate());
     
    518518    {
    519519        JumpBoots* newBoots = new JumpBoots(center_->getContext());
    520         if (newBoots != NULL && center_ != NULL)
     520        if (newBoots != nullptr && center_ != nullptr)
    521521        {
    522522            newBoots->addTemplate(center_->getBootsTemplate());
     
    531531    {
    532532        JumpShield* newShield = new JumpShield(center_->getContext());
    533         if (newShield != NULL && center_ != NULL)
     533        if (newShield != nullptr && center_ != nullptr)
    534534        {
    535535            newShield->addTemplate(center_->getShieldTemplate());
     
    544544    {
    545545        JumpShield* newShield = new JumpShield(center_->getContext());
    546         if (newShield != NULL && center_ != NULL)
     546        if (newShield != nullptr && center_ != nullptr)
    547547        {
    548548            newShield->addTemplate(center_->getShieldTemplate());
     
    557557    {
    558558        JumpEnemy* newEnemy = new JumpEnemy(center_->getContext());
    559         if (newEnemy != NULL && center_ != NULL)
     559        if (newEnemy != nullptr && center_ != nullptr)
    560560        {
    561561            switch (type)
     
    12701270    float Jump::getFuel() const
    12711271    {
    1272         if (this->figure_ != NULL)
    1273         {
    1274             if (this->figure_->rocketActive_ != NULL)
     1272        if (this->figure_ != nullptr)
     1273        {
     1274            if (this->figure_->rocketActive_ != nullptr)
    12751275            {
    12761276                return this->figure_->rocketActive_->getFuelState();
    12771277            }
    1278             else if (this->figure_->propellerActive_ != NULL)
     1278            else if (this->figure_->propellerActive_ != nullptr)
    12791279            {
    12801280                return this->figure_->propellerActive_->getFuelState();
    12811281            }
    1282             else if (this->figure_->shieldActive_ != NULL)
     1282            else if (this->figure_->shieldActive_ != nullptr)
    12831283            {
    12841284                return this->figure_->shieldActive_->getFuelState();
    12851285            }
    1286             else if (this->figure_->bootsActive_ != NULL)
     1286            else if (this->figure_->bootsActive_ != nullptr)
    12871287            {
    12881288                return this->figure_->bootsActive_->getFuelState();
  • code/branches/cpp11_v2/src/modules/jump/JumpBoots.cc

    r10733 r10765  
    7272        Vector3 rocketPosition = getWorldPosition();
    7373
    74         if (attachedToFigure_ == false && figure_ != NULL)
     74        if (attachedToFigure_ == false && figure_ != nullptr)
    7575        {
    7676            Vector3 figurePosition = figure_->getWorldPosition();
  • code/branches/cpp11_v2/src/modules/jump/JumpCenterpoint.cc

    r10733 r10765  
    8383    void JumpCenterpoint::checkGametype()
    8484    {
    85         if (getGametype() != NULL && this->getGametype()->isA(Class(Jump)))
     85        if (getGametype() != nullptr && this->getGametype()->isA(Class(Jump)))
    8686        {
    8787            Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype());
  • code/branches/cpp11_v2/src/modules/jump/JumpEnemy.cc

    r10733 r10765  
    119119        Vector3 enemyPosition = getPosition();
    120120
    121         if (figure_ != NULL)
     121        if (figure_ != nullptr)
    122122        {
    123123            Vector3 figurePosition = figure_->getPosition();
  • code/branches/cpp11_v2/src/modules/jump/JumpFigure.cc

    r10733 r10765  
    5151
    5252        // initialize variables
    53         leftHand_ = NULL;
    54         rightHand_ = NULL;
     53        leftHand_ = nullptr;
     54        rightHand_ = nullptr;
    5555        fieldHeight_ = 0;
    5656        fieldWidth_ = 0;
     
    7575        animateHands_ = false;
    7676        turnUp_ = false;
    77         rocketActive_ = NULL;
    78         propellerActive_ = NULL;
    79         bootsActive_ = NULL;
    80         shieldActive_ = NULL;
     77        rocketActive_ = nullptr;
     78        propellerActive_ = nullptr;
     79        bootsActive_ = nullptr;
     80        shieldActive_ = nullptr;
    8181        rocketSpeed_ = 0.0;
    8282        propellerSpeed_ = 0.0;
     
    111111            // Move up/down
    112112            Vector3 velocity = getVelocity();
    113             if (rocketActive_ != NULL)
     113            if (rocketActive_ != nullptr)
    114114            {
    115115                velocity.z = rocketSpeed_;
    116116            }
    117             else if (propellerActive_ != NULL)
     117            else if (propellerActive_ != nullptr)
    118118            {
    119119                velocity.z = propellerSpeed_;
     
    144144                }
    145145
    146                 if (leftHand_ != NULL)
     146                if (leftHand_ != nullptr)
    147147                {
    148148                    leftHand_->setOrientation(Vector3(0.0, 1.0, 0.0), Degree(-handAngle_));
    149149                }
    150                 if (rightHand_ != NULL)
     150                if (rightHand_ != nullptr)
    151151                {
    152152                    rightHand_->setOrientation(Vector3(0.0, 1.0, 0.0), Degree(handAngle_));
     
    212212        {
    213213            Vector3 velocity = getVelocity();
    214             if (bootsActive_ == NULL)
     214            if (bootsActive_ == nullptr)
    215215            {
    216216                velocity.z = 1.2f*jumpSpeed_;
     
    239239    void JumpFigure::CollisionWithEnemy(JumpEnemy* enemy)
    240240    {
    241         if (rocketActive_ == NULL && propellerActive_ == NULL && shieldActive_ == NULL)
     241        if (rocketActive_ == nullptr && propellerActive_ == nullptr && shieldActive_ == nullptr)
    242242        {
    243243            dead_ = true;
     
    247247    bool JumpFigure::StartRocket(JumpRocket* rocket)
    248248    {
    249         if (rocketActive_ == NULL && propellerActive_ == NULL && bootsActive_ == NULL)
     249        if (rocketActive_ == nullptr && propellerActive_ == nullptr && bootsActive_ == nullptr)
    250250        {
    251251            attach(rocket);
     
    266266        detach(rocket);
    267267        rocket->destroy();
    268         rocketActive_ = NULL;
     268        rocketActive_ = nullptr;
    269269    }
    270270
    271271    bool JumpFigure::StartPropeller(JumpPropeller* propeller)
    272272    {
    273         if (rocketActive_ == NULL && propellerActive_ == NULL && bootsActive_ == NULL)
     273        if (rocketActive_ == nullptr && propellerActive_ == nullptr && bootsActive_ == nullptr)
    274274        {
    275275            attach(propeller);
     
    290290        detach(propeller);
    291291        propeller->destroy();
    292         propellerActive_ = NULL;
     292        propellerActive_ = nullptr;
    293293    }
    294294
    295295    bool JumpFigure::StartBoots(JumpBoots* boots)
    296296    {
    297         if (rocketActive_ == NULL && propellerActive_ == NULL && bootsActive_ == NULL)
     297        if (rocketActive_ == nullptr && propellerActive_ == nullptr && bootsActive_ == nullptr)
    298298        {
    299299            attach(boots);
     
    314314        detach(boots);
    315315        boots->destroy();
    316         bootsActive_ = NULL;
     316        bootsActive_ = nullptr;
    317317    }
    318318
     
    338338        detach(shield);
    339339        shield->destroy();
    340         shieldActive_ = NULL;
     340        shieldActive_ = nullptr;
    341341    }
    342342
  • code/branches/cpp11_v2/src/modules/jump/JumpPlatform.cc

    r10733 r10765  
    8686        Vector3 platformPosition = this->getPosition();
    8787
    88         if (figure_ != NULL)
     88        if (figure_ != nullptr)
    8989        {
    9090            Vector3 figurePosition = figure_->getPosition();
  • code/branches/cpp11_v2/src/modules/jump/JumpPlatformTimer.cc

    r10733 r10765  
    4747        RegisterObject(JumpPlatformTimer);
    4848
    49         particleSpawner_ = NULL;
     49        particleSpawner_ = nullptr;
    5050
    5151        setProperties(3.0);
     
    7171
    7272        time_ -= dt;
    73         if (time_ < effectStartTime_ && particleSpawner_ == NULL)
     73        if (time_ < effectStartTime_ && particleSpawner_ == nullptr)
    7474        {
    7575
  • code/branches/cpp11_v2/src/modules/jump/JumpPropeller.cc

    r10733 r10765  
    7272        Vector3 PropellerPosition = getWorldPosition();
    7373
    74         if (attachedToFigure_ == false && figure_ != NULL)
     74        if (attachedToFigure_ == false && figure_ != nullptr)
    7575        {
    7676            Vector3 figurePosition = figure_->getWorldPosition();
  • code/branches/cpp11_v2/src/modules/jump/JumpRocket.cc

    r10733 r10765  
    7272        Vector3 rocketPosition = getWorldPosition();
    7373
    74         if (attachedToFigure_ == false && figure_ != NULL)
     74        if (attachedToFigure_ == false && figure_ != nullptr)
    7575        {
    7676            Vector3 figurePosition = figure_->getWorldPosition();
  • code/branches/cpp11_v2/src/modules/jump/JumpScore.cc

    r10733 r10765  
    4848        RegisterObject(JumpScore);
    4949
    50         owner_ = NULL;
     50        owner_ = nullptr;
    5151        showScore_ = false;
    5252        showFuel_ = false;
     
    7373        SUPER(JumpScore, tick, dt);
    7474
    75         if (owner_ != NULL)
     75        if (owner_ != nullptr)
    7676        {
    7777            if (!owner_->hasEnded())
     
    7979                player_ = owner_->getPlayer();
    8080
    81                 if (player_ != NULL)
     81                if (player_ != nullptr)
    8282                {
    8383                    if (showScore_ == true)
     
    116116        SUPER(JumpScore, changedOwner);
    117117
    118         if (this->getOwner() != NULL && this->getOwner()->getGametype())
     118        if (this->getOwner() != nullptr && this->getOwner()->getGametype())
    119119        {
    120120            this->owner_ = orxonox_cast<Jump*>(this->getOwner()->getGametype());
     
    122122        else
    123123        {
    124             this->owner_ = NULL;
     124            this->owner_ = nullptr;
    125125        }
    126126    }
  • code/branches/cpp11_v2/src/modules/jump/JumpShield.cc

    r10733 r10765  
    7272        Vector3 shieldPosition = getWorldPosition();
    7373
    74         if (attachedToFigure_ == false && figure_ != NULL)
     74        if (attachedToFigure_ == false && figure_ != nullptr)
    7575        {
    7676            Vector3 figurePosition = figure_->getWorldPosition();
  • code/branches/cpp11_v2/src/modules/jump/JumpSpring.cc

    r10733 r10765  
    7777        Vector3 springPosition = getWorldPosition();
    7878
    79         if (figure_ != NULL)
     79        if (figure_ != nullptr)
    8080        {
    8181            Vector3 figurePosition = figure_->getWorldPosition();
  • code/branches/cpp11_v2/src/modules/mini4dgame/Mini4Dgame.cc

    r10624 r10765  
    8888    void Mini4Dgame::cleanup()
    8989    {
    90         if(this->board_ != NULL)// Destroy the board, if present.
     90        if(this->board_ != nullptr)// Destroy the board, if present.
    9191        {
    9292            //this->board_->destroy();
     
    101101    void Mini4Dgame::start()
    102102    {
    103         if (this->board_ != NULL) // There needs to be a Mini4DgameCenterpoint, i.e. the area the game takes place.
     103        if (this->board_ != nullptr) // There needs to be a Mini4DgameCenterpoint, i.e. the area the game takes place.
    104104        {
    105105            /*
    106             if (this->board_ == NULL)
     106            if (this->board_ == nullptr)
    107107            {
    108108                this->board_ = new Mini4DgameBoard(this->board_->getContext());
     
    174174        assert(player);
    175175
    176         if(false)//this->player_ == NULL)
     176        if(false)//this->player_ == nullptr)
    177177        {
    178178            //this->player_ = player;
  • code/branches/cpp11_v2/src/modules/mini4dgame/Mini4DgameBoard.cc

    r10624 r10765  
    905905    void Mini4DgameBoard::checkGametype()
    906906    {
    907         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Mini4Dgame)))
     907        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Mini4Dgame)))
    908908        {
    909909            Mini4Dgame* Mini4DgameGametype = orxonox_cast<Mini4Dgame*>(this->getGametype());
  • code/branches/cpp11_v2/src/modules/notifications/NotificationDispatcher.cc

    r10624 r10765  
    177177
    178178        PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
    179         PlayerInfo* player = NULL;
     179        PlayerInfo* player = nullptr;
    180180
    181181        // If the trigger is a PlayerTrigger.
    182         if(pTrigger != NULL)
     182        if(pTrigger != nullptr)
    183183        {
    184184            if(!pTrigger->isForPlayer())  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
     
    190190            return false;
    191191
    192         if(player == NULL)
     192        if(player == nullptr)
    193193        {
    194194            orxout(verbose, context::notifications) << "The NotificationDispatcher was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << endl;
  • code/branches/cpp11_v2/src/modules/notifications/NotificationManager.cc

    r10624 r10765  
    334334        // If all senders are the target of the NotificationQueue, then the list of Notifications for that specific NotificationQueue is the same as the list of all Notifications.
    335335        bool bAll = set.find(NotificationListener::ALL) != set.end();
    336         std::multimap<std::time_t, Notification*>* map = NULL;
     336        std::multimap<std::time_t, Notification*>* map = nullptr;
    337337        if(bAll)
    338338            this->notificationLists_[queue->getName()] = &this->allNotificationsList_;
     
    395395        The name of the NotificationQueue.
    396396    @return
    397         Returns a pointer to the NotificationQueue with the input name. Returns NULL if no NotificationQueue with such a name exists.
     397        Returns a pointer to the NotificationQueue with the input name. Returns nullptr if no NotificationQueue with such a name exists.
    398398    */
    399399    NotificationQueue* NotificationManager::getQueue(const std::string & name)
    400400    {
    401401        std::map<const std::string, NotificationQueue*>::iterator it = this->queues_.find(name);
    402         // Returns NULL if no such NotificationQueue exists.
     402        // Returns nullptr if no such NotificationQueue exists.
    403403        if(it == this->queues_.end())
    404             return NULL;
     404            return nullptr;
    405405
    406406        return (*it).second;
  • code/branches/cpp11_v2/src/modules/notifications/NotificationQueueCEGUI.cc

    r10258 r10765  
    290290        The name of the NotificationQueueCEGUI to be got.
    291291    @return
    292         Returns a pointer to the NotificationQueueCEGUI, or NULL if it doesn't exist.
     292        Returns a pointer to the NotificationQueueCEGUI, or nullptr if it doesn't exist.
    293293    */
    294294    /*static*/ NotificationQueueCEGUI* NotificationQueueCEGUI::getQueue(const std::string& name)
    295295    {
    296296        NotificationQueue* queue = NotificationManager::getInstance().getQueue(name);
    297         if(queue == NULL || !queue->isA(Class(NotificationQueueCEGUI)))
    298             return NULL;
     297        if(queue == nullptr || !queue->isA(Class(NotificationQueueCEGUI)))
     298            return nullptr;
    299299        return static_cast<NotificationQueueCEGUI*>(queue);
    300300    }
  • code/branches/cpp11_v2/src/modules/objects/Script.cc

    r10624 r10765  
    140140
    141141        PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
    142         PlayerInfo* player = NULL;
     142        PlayerInfo* player = nullptr;
    143143
    144144        // If the trigger is a PlayerTrigger.
    145         if(pTrigger != NULL)
     145        if(pTrigger != nullptr)
    146146        {
    147147            if(!pTrigger->isForPlayer())  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
     
    153153            return false;
    154154
    155         if(player == NULL)  //TODO: Will this ever happen? If not, change in NotificationDispatcher as well.
     155        if(player == nullptr)  //TODO: Will this ever happen? If not, change in NotificationDispatcher as well.
    156156        {
    157157            orxout(internal_warning) << "The Script was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << endl;
  • code/branches/cpp11_v2/src/modules/objects/SpaceBoundaries.cc

    r10624 r10765  
    6161            for( std::vector<BillboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++)
    6262            {
    63                 if( current->billy != NULL)
     63                if( current->billy != nullptr)
    6464                {
    6565                    delete current->billy;
     
    127127    void SpaceBoundaries::setBillboardOptions(Billboard *billy)
    128128    {
    129         if(billy != NULL)
     129        if(billy != nullptr)
    130130        {
    131131            billy->setMaterial("Grid");
     
    250250    float SpaceBoundaries::computeDistance(WorldEntity *item)
    251251    {
    252         if(item != NULL)
     252        if(item != nullptr)
    253253        {
    254254            Vector3 itemPosition = item->getWorldPosition();
     
    310310    bool SpaceBoundaries::isHumanPlayer(Pawn *item)
    311311    {
    312         if(item != NULL)
     312        if(item != nullptr)
    313313        {
    314314            if(item->getPlayer())
  • code/branches/cpp11_v2/src/modules/objects/triggers/DistanceMultiTrigger.cc

    r10624 r10765  
    9797    {
    9898
    99         std::queue<MultiTriggerState*>* queue = NULL;
     99        std::queue<MultiTriggerState*>* queue = nullptr;
    100100
    101101        // Check for objects that were in range but no longer are. Iterate through all objects, that are in range.
     
    105105
    106106            // If the entity no longer exists.
    107             if(entity == NULL)
     107            if(entity == nullptr)
    108108            {
    109109                this->range_.erase(it++);
     
    118118
    119119                // If no queue has been created, yet.
    120                 if(queue == NULL)
     120                if(queue == nullptr)
    121121                    queue = new std::queue<MultiTriggerState*>();
    122122
     
    186186
    187187                // If no queue has been created, yet.
    188                 if(queue == NULL)
     188                if(queue == nullptr)
    189189                    queue = new std::queue<MultiTriggerState*>();
    190190
  • code/branches/cpp11_v2/src/modules/objects/triggers/DistanceTrigger.cc

    r10624 r10765  
    106106            this->setForPlayer(true);
    107107
    108         if (targetId == NULL)
     108        if (targetId == nullptr)
    109109        {
    110110            orxout(internal_error, context::triggers) << "\"" << targetStr << "\" is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ')' << endl;
     
    147147    {
    148148        // Check whether there is a cached object, it still exists and whether it is still in range, if so nothing further needs to be done.
    149         if(this->cache_ != NULL)
     149        if(this->cache_ != nullptr)
    150150        {
    151151            if((this->cache_->getWorldPosition() - this->getWorldPosition()).length() < this->distance_)
     
    206206
    207207                    Pawn* pawn = orxonox_cast<Pawn*>(entity);
    208                     if(pawn != NULL)
     208                    if(pawn != nullptr)
    209209                        this->setTriggeringPawn(pawn);
    210210                    else
    211                         orxout(internal_warning, context::triggers) << "Pawn was NULL." << endl;
     211                        orxout(internal_warning, context::triggers) << "Pawn was nullptr." << endl;
    212212                }
    213213               
  • code/branches/cpp11_v2/src/modules/objects/triggers/EventMultiTrigger.cc

    r9667 r10765  
    9696    {
    9797        // If the originator is a MultiTriggerContainer, the event originates from a MultiTrigger and thus the event only triggers the EventMultiTrigger for the originator that caused the MultiTrigger to trigger.
    98         if(originator != NULL && originator->isA(ClassIdentifier<MultiTriggerContainer>::getIdentifier()))
     98        if(originator != nullptr && originator->isA(ClassIdentifier<MultiTriggerContainer>::getIdentifier()))
    9999        {
    100100            MultiTriggerContainer* container = static_cast<MultiTriggerContainer*>(originator);
  • code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.cc

    r9667 r10765  
    124124        // Let the MultiTrigger return the states that trigger and process the new states if there are any.
    125125        std::queue<MultiTriggerState*>* queue  = this->letTrigger();
    126         if(queue != NULL)
     126        if(queue != nullptr)
    127127        {
    128128            while(queue->size() > 0)
    129129            {
    130130                MultiTriggerState* state = queue->front();
    131                 // If the state is NULL. (This really shouldn't happen)
    132                 if(state == NULL)
     131                // If the state is nullptr. (This really shouldn't happen)
     132                if(state == nullptr)
    133133                {
    134                     orxout(internal_error, context::triggers) << "In MultiTrigger '" << this->getName() << "' (&" << this << "), Error: State of new states queue was NULL. State ignored." << endl;
     134                    orxout(internal_error, context::triggers) << "In MultiTrigger '" << this->getName() << "' (&" << this << "), Error: State of new states queue was nullptr. State ignored." << endl;
    135135                    queue->pop();
    136136                    continue;
     
    227227                            {
    228228                                // If the MultiTrigger is set to broadcast and has no originator a boradcast is fired.
    229                                 if(this->getBroadcast() && state->originator == NULL)
     229                                if(this->getBroadcast() && state->originator == nullptr)
    230230                                    this->broadcast(bActive);
    231231                                // Else a normal event is fired.
     
    240240                        {
    241241                            // Print some debug output if the state has changed.
    242                             if(state->originator != NULL)
     242                            if(state->originator != nullptr)
    243243                                orxout(verbose, context::triggers) << "MultiTrigger '" << this->getName() << "' (&" << this << ") changed state. originator: " << state->originator->getIdentifier()->getName() << " (&" << state->originator << "), active: " << bActive << ", triggered: " << state->bTriggered << "." << endl;
    244244                            else
    245                                 orxout(verbose, context::triggers) << "MultiTrigger '" << this->getName() << "' (&" << this << ") changed state. originator: NULL, active: " << bActive << ", triggered: " << state->bTriggered << "." << endl;
     245                                orxout(verbose, context::triggers) << "MultiTrigger '" << this->getName() << "' (&" << this << ") changed state. originator: nullptr, active: " << bActive << ", triggered: " << state->bTriggered << "." << endl;
    246246
    247247                            // If the MultiTrigger has a parent trigger, that is itself a MultiTrigger, it needs to call a method to notify him, that its activity has changed.
    248                             if(this->parent_ != NULL && this->parent_->isMultiTrigger())
     248                            if(this->parent_ != nullptr && this->parent_->isMultiTrigger())
    249249                                static_cast<MultiTrigger*>(this->parent_)->childActivityChanged(state->originator);
    250250                        }
     
    299299
    300300        // If the target is not a valid class name display an error.
    301         if (target == NULL)
     301        if (target == nullptr)
    302302        {
    303303            orxout(internal_error, context::triggers) << "'" << targetStr << "' is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ")" << endl;
     
    327327
    328328        // If the target is not a valid class name display an error.
    329         if (target == NULL)
     329        if (target == nullptr)
    330330        {
    331331            orxout(internal_error, context::triggers) << "'" << targetStr << "' is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ")" << endl;
     
    346346    std::queue<MultiTriggerState*>* MultiTrigger::letTrigger(void)
    347347    {
    348         return NULL;
     348        return nullptr;
    349349    }
    350350
     
    443443    void MultiTrigger::fire(bool status, BaseObject* originator)
    444444    {
    445         // If the originator is NULL, a normal event without MultiTriggerContainer is sent.
    446         if(originator == NULL)
     445        // If the originator is nullptr, a normal event without MultiTriggerContainer is sent.
     446        if(originator == nullptr)
    447447        {
    448448            this->fireEvent(status);
     
    479479    bool MultiTrigger::addState(MultiTriggerState* state)
    480480    {
    481         assert(state); // The state really shouldn't be NULL.
     481        assert(state); // The state really shouldn't be nullptr.
    482482
    483483        // If the originator is no target of this MultiTrigger.
  • code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.h

    r9667 r10765  
    7676        - @b simultaneousTriggerers The number of simultaneous triggerers limits the number of objects that are allowed to trigger the MultiTrigger at the same time. Or more precisely, the number of distinct objects the MultiTrigger has <em>triggered</em> states for, at each point in time. The default is <code>-1</code>, which denotes infinity.
    7777        - @b mode The mode describes how the MultiTrigger acts in relation to all the triggers, that are appended to it. There are 3 modes: <em>and</em>, meaning that the MultiTrigger can only be triggered if all the appended triggers are active. <em>or</em>, meaning that the MultiTrigger can only triggered if at least one of the appended triggers is active. And <em>xor</em>, meaning that the MultiTrigger can only be triggered if one and only one appended trigger is active. Note, that I wrote <em>can only be active</em>, that implies, that there is an additional condition to the <em>activity</em> of the MultiTrigger and that is the fulfillment of the triggering condition (the MultiTrigger itself doesn't have one, but all derived classes should). Also bear in mind, that the <em>activity</em> of a MultiTrigger is still coupled to the object that triggered it. The default is <em>and</em>.
    78         - @b broadcast Broadcast is a boolean, if true the MutliTrigger is in <em>broadcast-mode</em>, meaning, that all trigger events that are caused by no originator (originator is NULL) are broadcast as having come from every possible originator, or more precisely as having come from all objects that are specified targets of this MultiTrigger. The default is false.
     78        - @b broadcast Broadcast is a boolean, if true the MutliTrigger is in <em>broadcast-mode</em>, meaning, that all trigger events that are caused by no originator (originator is nullptr) are broadcast as having come from every possible originator, or more precisely as having come from all objects that are specified targets of this MultiTrigger. The default is false.
    7979        - @b target The target describes the kind of objects that are allowed to trigger this MultiTrigger. The default is @ref orxonox::Pawn "Pawn".
    8080        - Also there is the possibility of appending triggers (as long as they inherit from TriggerBase) to the MultiTrigger just by adding them as children in the XML description of your MultiTrigger.
     
    110110            */
    111111            inline bool isActive(void) const
    112                 { return this->isActive(NULL); }
    113             bool isActive(BaseObject* triggerer = NULL) const; //!< Check whether the MultiTrigger is active for a given object.
     112                { return this->isActive(nullptr); }
     113            bool isActive(BaseObject* triggerer = nullptr) const; //!< Check whether the MultiTrigger is active for a given object.
    114114
    115115            /**
     
    145145            */
    146146            inline bool isTarget(BaseObject* target)
    147                 { if(target == NULL) return true; else return targetMask_.isIncluded(target->getIdentifier()); }
     147                { if(target == nullptr) return true; else return targetMask_.isIncluded(target->getIdentifier()); }
    148148               
    149149            void addTarget(const std::string& targets); //!< Add some target to the MultiTrigger.
     
    152152            virtual std::queue<MultiTriggerState*>* letTrigger(void); //!< This method is called by the MultiTrigger to get information about new trigger events that need to be looked at.
    153153
    154             void changeTriggered(BaseObject* originator = NULL); //!< This method can be called by any class inheriting from MultiTrigger to change it's triggered status for a specified originator.
    155 
    156             bool isModeTriggered(BaseObject* triggerer = NULL); //!< Checks whether the MultiTrigger is triggered concerning it's children.
    157             bool isTriggered(BaseObject* triggerer = NULL); //!< Get whether the MultiTrigger is triggered for a given object.
    158 
    159             virtual void fire(bool status, BaseObject* originator = NULL);  //!< Helper method. Creates an Event for the given status and originator and fires it.
     154            void changeTriggered(BaseObject* originator = nullptr); //!< This method can be called by any class inheriting from MultiTrigger to change it's triggered status for a specified originator.
     155
     156            bool isModeTriggered(BaseObject* triggerer = nullptr); //!< Checks whether the MultiTrigger is triggered concerning it's children.
     157            bool isTriggered(BaseObject* triggerer = nullptr); //!< Get whether the MultiTrigger is triggered for a given object.
     158
     159            virtual void fire(bool status, BaseObject* originator = nullptr);  //!< Helper method. Creates an Event for the given status and originator and fires it.
    160160            void broadcast(bool status); //!< Helper method. Broadcasts an Event for every object that is a target.
    161161
  • code/branches/cpp11_v2/src/modules/objects/triggers/MultiTriggerContainer.cc

    r9667 r10765  
    5050        The creator.
    5151    */
    52     MultiTriggerContainer::MultiTriggerContainer(Context* context) : BaseObject(context), originator_(NULL), data_(NULL)
     52    MultiTriggerContainer::MultiTriggerContainer(Context* context) : BaseObject(context), originator_(nullptr), data_(nullptr)
    5353    {
    5454        RegisterObject(MultiTriggerContainer);
     
    7070
    7171        Pawn* pawn = orxonox_cast<Pawn*>(data);
    72         if(pawn != NULL)
     72        if(pawn != nullptr)
    7373        {
    7474            this->setForPlayer(true);
  • code/branches/cpp11_v2/src/modules/objects/triggers/TriggerBase.cc

    r9667 r10765  
    6767        this->mode_ = TriggerMode::EventTriggerAND;
    6868
    69         this->parent_ = NULL;
     69        this->parent_ = nullptr;
    7070
    7171        this->bMultiTrigger_ = false;
     
    170170        The index.
    171171    @return
    172         Returns a pointer ot the trigger. NULL if no such trigger exists.
     172        Returns a pointer ot the trigger. nullptr if no such trigger exists.
    173173    */
    174174    const TriggerBase* TriggerBase::getTrigger(unsigned int index) const
     
    176176        // If the index is greater than the number of children.
    177177        if (this->children_.size() <= index)
    178             return NULL;
     178            return nullptr;
    179179
    180180        std::set<TriggerBase*>::const_iterator it;
  • code/branches/cpp11_v2/src/modules/overlays/GUIOverlay.cc

    r9667 r10765  
    9292            ControllableEntity* entity = orxonox_cast<ControllableEntity*>(this->getOwner());
    9393            if (entity)
    94                 GUIManager::getInstance().setPlayer(name, entity->getPlayer()); //Set Player is going to be NULL, so it needs to be set in changedVisibility() as well.
     94                GUIManager::getInstance().setPlayer(name, entity->getPlayer()); //Set Player is going to be nullptr, so it needs to be set in changedVisibility() as well.
    9595        }
    9696    }
  • code/branches/cpp11_v2/src/modules/overlays/hud/HUDEnemyHealthBar.cc

    r9667 r10765  
    6262    void HUDEnemyHealthBar::updateTarget()
    6363    {
    64         Pawn* pawn = NULL;
     64        Pawn* pawn = nullptr;
    6565        if (this->owner_ && this->useEnemyBar_)
    6666        {
     
    7373            // Don't show the HealthBar if the pawn is invisible
    7474            if (pawn && !pawn->isVisible())
    75                 pawn = NULL;
     75                pawn = nullptr;
    7676        }
    7777        // Set the pawn as owner of the HealthBar
    7878        this->setHealthBarOwner(pawn);
    79         this->setVisible(pawn != NULL);
     79        this->setVisible(pawn != nullptr);
    8080    }
    8181
  • code/branches/cpp11_v2/src/modules/overlays/hud/HUDNavigation.cc

    r10624 r10765  
    134134        for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)
    135135        {
    136             if (it->second.text_ != NULL)
     136            if (it->second.text_ != nullptr)
    137137                it->second.text_->setFontName(this->fontName_);
    138138        }
     
    183183
    184184        Camera* cam = CameraManager::getInstance().getActiveCamera();
    185         if (cam == NULL)
     185        if (cam == nullptr)
    186186        return;
    187187        const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix();
     
    476476                    if(!it->second.selected_
    477477                            || it->first->getRVVelocity().squaredLength() == 0
    478                             || pawn == NULL
     478                            || pawn == nullptr
    479479                            /* TODO : improve getTeam in such a way that it works
    480                              * || humanPawn == NULL
     480                             * || humanPawn == nullptr
    481481                             * || pawn->getTeam() == humanPawn->getTeam()*/)
    482482                    {
     
    534534        for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)
    535535        {
    536             if (it->second.health_ != NULL)
     536            if (it->second.health_ != nullptr)
    537537                it->second.health_->setDimensions(this->healthMarkerSize_ * xScale, this->healthMarkerSize_ * yScale);
    538             if (it->second.healthLevel_ != NULL)
     538            if (it->second.healthLevel_ != nullptr)
    539539                it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * xScale, this->healthLevelMarkerSize_ * yScale);
    540             if (it->second.panel_ != NULL)
     540            if (it->second.panel_ != nullptr)
    541541                it->second.panel_->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);
    542             if (it->second.text_ != NULL)
     542            if (it->second.text_ != nullptr)
    543543                it->second.text_->setCharHeight(this->textSize_ * yScale);
    544             if (it->second.target_ != NULL)
     544            if (it->second.target_ != nullptr)
    545545                it->second.target_->setDimensions(this->aimMarkerSize_ * xScale, this->aimMarkerSize_ * yScale);
    546546        }
     
    553553
    554554        if (this->activeObjectList_.size() >= this->markerLimit_)
    555         if (object == NULL)
     555        if (object == nullptr)
    556556        return;
    557557
  • code/branches/cpp11_v2/src/modules/pickup/CollectiblePickup.cc

    r10624 r10765  
    4747        Registers the object and initializes variables.
    4848    */
    49     CollectiblePickup::CollectiblePickup() : collection_(NULL)
     49    CollectiblePickup::CollectiblePickup() : collection_(nullptr)
    5050    {
    5151        RegisterObject(CollectiblePickup);
     
    103103    void CollectiblePickup::wasRemovedFromCollection(void)
    104104    {
    105         this->collection_ = NULL;
     105        this->collection_ = nullptr;
    106106    }
    107107}
  • code/branches/cpp11_v2/src/modules/pickup/CollectiblePickup.h

    r9348 r10765  
    6969            */
    7070            bool isInCollection(void) const
    71                 { return this->collection_ != NULL; }
     71                { return this->collection_ != nullptr; }
    7272
    7373        private:
  • code/branches/cpp11_v2/src/modules/pickup/PickupCollection.cc

    r9667 r10765  
    148148        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
    149149        {
    150             if(this->getCarrier() == NULL)
    151                 (*it)->setCarrier(NULL);
     150            if(this->getCarrier() == nullptr)
     151                (*it)->setCarrier(nullptr);
    152152            else
    153153                (*it)->setCarrier(this->getCarrier()->getTarget(*it));
     
    227227    bool PickupCollection::addPickupable(CollectiblePickup* pickup)
    228228    {
    229         if(pickup == NULL)
     229        if(pickup == nullptr)
    230230            return false;
    231231
     
    247247    {
    248248        if(this->pickups_.size() >= index)
    249             return NULL;
     249            return nullptr;
    250250
    251251        std::list<CollectiblePickup*>::const_iterator it = this->pickups_.begin();
  • code/branches/cpp11_v2/src/modules/pickup/PickupManager.cc

    r10624 r10765  
    6868        Constructor. Registers the PickupManager and creates the default PickupRepresentation.
    6969    */
    70     PickupManager::PickupManager() : guiLoaded_(false), pickupHighestIndex_(0), defaultRepresentation_(NULL)
     70    PickupManager::PickupManager() : guiLoaded_(false), pickupHighestIndex_(0), defaultRepresentation_(nullptr)
    7171    {
    7272        RegisterObject(PickupManager);
     
    8585    {
    8686        // Destroying the default representation.
    87         if(this->defaultRepresentation_ != NULL)
     87        if(this->defaultRepresentation_ != nullptr)
    8888            this->defaultRepresentation_->destroy();
    8989
     
    184184        CollectiblePickup* collectible = orxonox_cast<CollectiblePickup*>(pickup);
    185185        // If the Pickupable is part of a PickupCollection it isn't displayed in the PickupInventory, just the PickupCollection is.
    186         if(collectible != NULL && collectible->isInCollection())
     186        if(collectible != nullptr && collectible->isInCollection())
    187187            return;
    188188
    189189        // Getting clientId of the host this change of the pickup's used status concerns.
    190190        PickupCarrier* carrier = pickup->getCarrier();
    191         while(carrier->getCarrierParent() != NULL)
     191        while(carrier->getCarrierParent() != nullptr)
    192192            carrier = carrier->getCarrierParent();
    193193        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    194         if(pawn == NULL)
     194        if(pawn == nullptr)
    195195            return;
    196196        PlayerInfo* info = pawn->getPlayer();
    197         if(info == NULL)
     197        if(info == nullptr)
    198198            return;
    199199        unsigned int clientId = info->getClientID();
     
    265265        CollectiblePickup* collectible = orxonox_cast<CollectiblePickup*>(pickup);
    266266        // If the Pickupable is part of a PickupCollection it isn't displayed in the PickupInventory, just the PickupCollection is.
    267         if(collectible != NULL && collectible->isInCollection())
     267        if(collectible != nullptr && collectible->isInCollection())
    268268            return;
    269269
    270270        // Getting clientId of the host this change of the pickup's pickedUp status concerns.
    271271        PickupCarrier* carrier = pickup->getCarrier();
    272         while(carrier->getCarrierParent() != NULL)
     272        while(carrier->getCarrierParent() != nullptr)
    273273            carrier = carrier->getCarrierParent();
    274274        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    275         if(pawn == NULL)
     275        if(pawn == nullptr)
    276276            return;
    277277        PlayerInfo* info = pawn->getFormerPlayer();
    278         if(info == NULL)
     278        if(info == nullptr)
    279279            return;
    280280        unsigned int clientId = info->getClientID();
     
    399399                return;
    400400            Pickupable* pickupable = this->pickups_.find(pickup)->second;
    401             if(pickupable != NULL)
     401            if(pickupable != nullptr)
    402402                pickupable->drop();
    403403        }
     
    442442                return;
    443443            Pickupable* pickupable = this->pickups_.find(pickup)->second;
    444             if(pickupable != NULL)
     444            if(pickupable != nullptr)
    445445                pickupable->setUsed(use);
    446446        }
  • code/branches/cpp11_v2/src/modules/pickup/PickupRepresentation.cc

    r9667 r10765  
    5252        This is primarily for use of the PickupManager in creating a default PickupRepresentation.
    5353    */
    54     PickupRepresentation::PickupRepresentation() : BaseObject(NULL), Synchronisable(NULL), spawnerRepresentation_(NULL)
     54    PickupRepresentation::PickupRepresentation() : BaseObject(nullptr), Synchronisable(nullptr), spawnerRepresentation_(nullptr)
    5555    {
    5656        RegisterObject(PickupRepresentation);
     
    6464        Default Constructor. Registers the object and initializes its member variables.
    6565    */
    66     PickupRepresentation::PickupRepresentation(Context* context) : BaseObject(context), Synchronisable(context), spawnerRepresentation_(NULL)
     66    PickupRepresentation::PickupRepresentation(Context* context) : BaseObject(context), Synchronisable(context), spawnerRepresentation_(nullptr)
    6767    {
    6868        RegisterObject(PickupRepresentation);
     
    7878    PickupRepresentation::~PickupRepresentation()
    7979    {
    80         if(this->spawnerRepresentation_ != NULL)
     80        if(this->spawnerRepresentation_ != nullptr)
    8181            this->spawnerRepresentation_->destroy();
    8282
     
    135135    StaticEntity* PickupRepresentation::createSpawnerRepresentation(PickupSpawner* spawner)
    136136    {
    137         if(this->spawnerRepresentation_ == NULL)
     137        if(this->spawnerRepresentation_ == nullptr)
    138138        {
    139139            orxout(verbose, context::pickups) << "PickupRepresentation: No spawner representation found." << endl;
     
    149149        this->spawnerRepresentation_->setVisible(true);
    150150        StaticEntity* temp = this->spawnerRepresentation_;
    151         this->spawnerRepresentation_ = NULL;
     151        this->spawnerRepresentation_ = nullptr;
    152152
    153153        return temp;
     
    164164    {
    165165        this->spawnerRepresentation_ = representation;
    166         if(this->spawnerRepresentation_ != NULL)
     166        if(this->spawnerRepresentation_ != nullptr)
    167167            this->spawnerRepresentation_->setVisible(false);
    168168    }
  • code/branches/cpp11_v2/src/modules/pickup/PickupRepresentation.h

    r9667 r10765  
    119119            @brief Get the StaticEntity that defines how the PickupSpawner of the Pickupable represented by this PickupRepresentation looks like.
    120120            @param index The index.
    121             @return Returns (for index = 0) a pointer to the StaticEntity. For index > 0 it returns NULL.
     121            @return Returns (for index = 0) a pointer to the StaticEntity. For index > 0 it returns nullptr.
    122122            */
    123123            inline const StaticEntity* getSpawnerRepresentationIndex(unsigned int index) const
    124                 { if(index == 0) return this->spawnerRepresentation_; return NULL; }
     124                { if(index == 0) return this->spawnerRepresentation_; return nullptr; }
    125125            /**
    126126            @brief Get the name of the image representing the pickup in the PickupInventory.
  • code/branches/cpp11_v2/src/modules/pickup/PickupSpawner.cc

    r10624 r10765  
    5555        Pointer to the object which created this item.
    5656    */
    57     PickupSpawner::PickupSpawner(Context* context) : StaticEntity(context), pickup_(NULL), representation_(NULL), pickupTemplate_(NULL)
     57    PickupSpawner::PickupSpawner(Context* context) : StaticEntity(context), pickup_(nullptr), representation_(nullptr), pickupTemplate_(nullptr)
    5858    {
    5959        RegisterObject(PickupSpawner);
     
    7474        this->selfDestruct_ = false;
    7575
    76         this->setPickupable(NULL);
     76        this->setPickupable(nullptr);
    7777    }
    7878
     
    8383    PickupSpawner::~PickupSpawner()
    8484    {
    85         if(this->isInitialized() && this->selfDestruct_ && this->pickup_ != NULL)
     85        if(this->isInitialized() && this->selfDestruct_ && this->pickup_ != nullptr)
    8686            this->pickup_->destroy();
    8787    }
     
    160160            for(ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
    161161            {
    162                 if(spawner == NULL) // Stop if the PickupSpawner has been deleted (e.g. because it has run out of pickups to distribute).
     162                if(spawner == nullptr) // Stop if the PickupSpawner has been deleted (e.g. because it has run out of pickups to distribute).
    163163                    break;
    164164
     
    166166                PickupCarrier* carrier = static_cast<PickupCarrier*>(*it);
    167167                // If a PickupCarrier, that fits the target-range of the Pickupable spawned by this PickupSpawner, is in trigger-distance and the carrier is not blocked.
    168                 if(distance.length() < this->triggerDistance_ && carrier != NULL && this->blocked_.find(carrier) == this->blocked_.end())
     168                if(distance.length() < this->triggerDistance_ && carrier != nullptr && this->blocked_.find(carrier) == this->blocked_.end())
    169169                {
    170170                    if(carrier->isTarget(this->pickup_))
     
    195195        pickedUp = false; // To avoid compiler warning.
    196196
    197         this->setPickupable(NULL);
     197        this->setPickupable(nullptr);
    198198        this->decrementSpawnsRemaining();
    199199    }
     
    282282        {
    283283            orxout(internal_error, context::pickups) << "Massive Error: PickupSpawner still alive until having spawned last item." << endl;
    284             return NULL;
    285         }
    286 
    287         if (this->pickupTemplate_ != NULL)
     284            return nullptr;
     285        }
     286
     287        if (this->pickupTemplate_ != nullptr)
    288288        {
    289289            Identifier* identifier = this->pickupTemplate_->getBaseclassIdentifier();
    290             if (identifier != NULL)
     290            if (identifier != nullptr)
    291291            {
    292292                Pickupable* pickup = orxonox_cast<Pickupable*>(identifier->fabricate(this->getContext()));
     
    298298        }
    299299
    300         return NULL;
     300        return nullptr;
    301301    }
    302302
     
    309309    void PickupSpawner::setPickupable(Pickupable* pickup)
    310310    {
    311         if (this->representation_ != NULL)
     311        if (this->representation_ != nullptr)
    312312        {
    313313            this->representation_->destroy();
    314             this->representation_ = NULL;
    315         }
    316 
    317         if (pickup != NULL)
    318         {
    319             if (this->pickup_ != NULL)
     314            this->representation_ = nullptr;
     315        }
     316
     317        if (pickup != nullptr)
     318        {
     319            if (this->pickup_ != nullptr)
    320320                this->pickup_->destroy();
    321321
  • code/branches/cpp11_v2/src/modules/pickup/items/DamageBoostPickup.cc

    r9667 r10765  
    106106
    107107        SpaceShip* ship = this->carrierToSpaceShipHelper();
    108         if(ship == NULL) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
     108        if(ship == nullptr) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
    109109            this->Pickupable::destroy();
    110110
     
    152152        Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
    153153    @return
    154         A pointer to the SpaceShip, or NULL if the conversion failed.
     154        A pointer to the SpaceShip, or nullptr if the conversion failed.
    155155    */
    156156    SpaceShip* DamageBoostPickup::carrierToSpaceShipHelper(void)
     
    159159        SpaceShip* ship = orxonox_cast<SpaceShip*>(carrier);
    160160
    161         if(ship == NULL)
     161        if(ship == nullptr)
    162162        {
    163163            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in DamageBoostPickup." << endl;
  • code/branches/cpp11_v2/src/modules/pickup/items/DronePickup.cc

    r9667 r10765  
    122122
    123123                Pawn* pawn = this->carrierToPawnHelper();
    124                 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     124                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    125125                    this->Pickupable::destroy();
    126126
     
    131131                Controller* controller = drone->getController();
    132132                DroneController* droneController = orxonox_cast<DroneController*>(controller);
    133                 if(droneController != NULL)
     133                if(droneController != nullptr)
    134134                {
    135135                    droneController->setOwner(pawn);
     
    156156        Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
    157157    @return
    158         A pointer to the Pawn, or NULL if the conversion failed.
     158        A pointer to the Pawn, or nullptr if the conversion failed.
    159159    */
    160160    Pawn* DronePickup::carrierToPawnHelper(void)
     
    163163        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    164164
    165         if(pawn == NULL)
     165        if(pawn == nullptr)
    166166        {
    167167            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in DronePickup." << endl;
  • code/branches/cpp11_v2/src/modules/pickup/items/HealthPickup.cc

    r9667 r10765  
    114114        {
    115115            Pawn* pawn = this->carrierToPawnHelper();
    116             if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     116            if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    117117                this->Pickupable::destroy();
    118118
     
    168168            {
    169169                Pawn* pawn = this->carrierToPawnHelper();
    170                 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     170                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    171171                    this->Pickupable::destroy();
    172172
     
    206206                Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    207207
    208                 if(pawn == NULL)
     208                if(pawn == nullptr)
    209209                {
    210210                    orxout(internal_error, context::pickups) << "Something went horribly wrong in Health Pickup. PickupCarrier is '" << carrier->getIdentifier()->getName() << "' instead of Pawn." << endl;
     
    233233        Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
    234234    @return
    235         A pointer to the Pawn, or NULL if the conversion failed.
     235        A pointer to the Pawn, or nullptr if the conversion failed.
    236236    */
    237237    Pawn* HealthPickup::carrierToPawnHelper(void)
     
    240240        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    241241
    242         if(pawn == NULL)
     242        if(pawn == nullptr)
    243243            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in HealthPickup." << endl;
    244244
  • code/branches/cpp11_v2/src/modules/pickup/items/InvisiblePickup.cc

    r9667 r10765  
    139139    {
    140140        Pawn* pawn = this->carrierToPawnHelper();
    141         if(pawn == NULL)
     141        if(pawn == nullptr)
    142142            return false;
    143143
     
    163163        Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
    164164    @return
    165         A pointer to the Pawn, or NULL if the conversion failed.
     165        A pointer to the Pawn, or nullptr if the conversion failed.
    166166    */
    167167    Pawn* InvisiblePickup::carrierToPawnHelper(void)
     
    170170        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    171171
    172         if(pawn == NULL)
     172        if(pawn == nullptr)
    173173        {
    174174            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in InvisiblePickup." << endl;
  • code/branches/cpp11_v2/src/modules/pickup/items/MetaPickup.cc

    r9667 r10765  
    107107        {
    108108            PickupCarrier* carrier = this->getCarrier();
    109             if(this->getMetaType() != pickupMetaType::none && carrier != NULL)
     109            if(this->getMetaType() != pickupMetaType::none && carrier != nullptr)
    110110            {
    111111                // If the metaType is destroyCarrier, then the PickupCarrier is destroyed.
     
    121121                {
    122122                    Pickupable* pickup = (*it);
    123                     if(pickup == NULL || pickup == this)
     123                    if(pickup == nullptr || pickup == this)
    124124                        continue;
    125125
  • code/branches/cpp11_v2/src/modules/pickup/items/ShieldPickup.cc

    r9667 r10765  
    9999
    100100        Pawn* pawn = this->carrierToPawnHelper();
    101         if(pawn == NULL)
     101        if(pawn == nullptr)
    102102            this->Pickupable::destroy();
    103103
     
    143143    Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
    144144    @return
    145     A pointer to the Pawn, or NULL if the conversion failed.
     145    A pointer to the Pawn, or nullptr if the conversion failed.
    146146    */
    147147    Pawn* ShieldPickup::carrierToPawnHelper(void)
     
    150150        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    151151
    152         if(pawn == NULL)
     152        if(pawn == nullptr)
    153153        {
    154154            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in ShieldPickup." << endl;
  • code/branches/cpp11_v2/src/modules/pickup/items/ShrinkPickup.cc

    r10624 r10765  
    146146        {
    147147            Pawn* pawn = this->carrierToPawnHelper();
    148             if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     148            if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    149149            {
    150150                this->Pickupable::destroy();
     
    173173                //TODO: Deploy particle effect.
    174174                Pawn* pawn = this->carrierToPawnHelper();
    175                 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     175                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    176176                    return;
    177177
     
    187187                {
    188188                    CameraPosition* cameraPos = pawn->getCameraPosition(index);
    189                     if(cameraPos == NULL)
     189                    if(cameraPos == nullptr)
    190190                        continue;
    191191                    cameraPos->setPosition(cameraPos->getPosition()/factor);
     
    201201                //TODO: Deploy particle effect.
    202202                Pawn* pawn = this->carrierToPawnHelper();
    203                 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     203                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    204204                    return;
    205205
     
    213213                {
    214214                    CameraPosition* cameraPos = pawn->getCameraPosition(index);
    215                     if(cameraPos == NULL)
     215                    if(cameraPos == nullptr)
    216216                        continue;
    217217                    cameraPos->setPosition(cameraPos->getPosition()/this->shrinkFactor_);
     
    237237            {
    238238                Pawn* pawn = this->carrierToPawnHelper();
    239                 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     239                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    240240                {
    241241                    this->Pickupable::destroy();
     
    268268                {
    269269                    CameraPosition* cameraPos = pawn->getCameraPosition(index);
    270                     if(cameraPos == NULL)
     270                    if(cameraPos == nullptr)
    271271                        continue;
    272272                    cameraPos->setPosition(cameraPos->getPosition()/factor);
     
    277277            {
    278278                Pawn* pawn = this->carrierToPawnHelper();
    279                 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     279                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    280280                    this->Pickupable::destroy();
    281281
     
    309309                {
    310310                    CameraPosition* cameraPos = pawn->getCameraPosition(index);
    311                     if(cameraPos == NULL)
     311                    if(cameraPos == nullptr)
    312312                        continue;
    313313                    cameraPos->setPosition(cameraPos->getPosition()/factor);
  • code/branches/cpp11_v2/src/modules/pickup/items/SpeedPickup.cc

    r9667 r10765  
    9999
    100100        SpaceShip* ship = this->carrierToSpaceShipHelper();
    101         if(ship == NULL) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
     101        if(ship == nullptr) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
    102102            this->Pickupable::destroy();
    103103
     
    143143        Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
    144144    @return
    145         A pointer to the SpaceShip, or NULL if the conversion failed.
     145        A pointer to the SpaceShip, or nullptr if the conversion failed.
    146146    */
    147147    SpaceShip* SpeedPickup::carrierToSpaceShipHelper(void)
     
    150150        SpaceShip* ship = orxonox_cast<SpaceShip*>(carrier);
    151151
    152         if(ship == NULL)
     152        if(ship == nullptr)
    153153        {
    154154            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in SpeedPickup." << endl;
  • code/branches/cpp11_v2/src/modules/pong/Pong.cc

    r9939 r10765  
    103103    void Pong::cleanup()
    104104    {
    105         if (this->ball_ != NULL) // Destroy the ball, if present.
     105        if (this->ball_ != nullptr) // Destroy the ball, if present.
    106106        {
    107107            this->ball_->destroy();
     
    112112        for (size_t i = 0; i < 2; ++i)
    113113        {
    114             if (this->bat_[0] != NULL)
     114            if (this->bat_[0] != nullptr)
    115115            {
    116116                this->bat_[0]->destroy();
     
    127127    void Pong::start()
    128128    {
    129         if (this->center_ != NULL) // There needs to be a PongCenterpoint, i.e. the area the game takes place.
    130         {
    131             if (this->ball_ == NULL) // If there is no ball, create a new ball.
     129        if (this->center_ != nullptr) // There needs to be a PongCenterpoint, i.e. the area the game takes place.
     130        {
     131            if (this->ball_ == nullptr) // If there is no ball, create a new ball.
    132132            {
    133133                this->ball_ = new PongBall(this->center_->getContext());
     
    147147            for (size_t i = 0; i < 2; ++i)
    148148            {
    149                 if (this->bat_[i] == NULL)
     149                if (this->bat_[i] == nullptr)
    150150                {
    151151                    this->bat_[i] = new PongBat(this->center_->getContext());
     
    231231
    232232        // If the first (left) bat has no player.
    233         if (this->bat_[0]->getPlayer() == NULL)
     233        if (this->bat_[0]->getPlayer() == nullptr)
    234234        {
    235235            player->startControl(this->bat_[0]);
     
    237237        }
    238238        // If the second (right) bat has no player.
    239         else if (this->bat_[1]->getPlayer() == NULL)
     239        else if (this->bat_[1]->getPlayer() == nullptr)
    240240        {
    241241            player->startControl(this->bat_[1]);
     
    247247
    248248        // If the player is an AI, it receives a pointer to the ball.
    249         if (player->getController() != NULL && player->getController()->isA(Class(PongAI)))
     249        if (player->getController() != nullptr && player->getController()->isA(Class(PongAI)))
    250250        {
    251251            PongAI* ai = orxonox_cast<PongAI*>(player->getController());
     
    262262        Deathmatch::playerScored(player, score);
    263263
    264         if (this->center_ != NULL) // If there is a centerpoint.
     264        if (this->center_ != nullptr) // If there is a centerpoint.
    265265        {
    266266            // Fire an event for the player that has scored, to be able to react to it in the level, e.g. by displaying fireworks.
     
    271271
    272272            // Also announce, that the player has scored.
    273             if (player != NULL)
     273            if (player != nullptr)
    274274                this->gtinfo_->sendAnnounceMessage(player->getName() + " scored");
    275275        }
    276276
    277277        // If there is a ball present, reset its position, velocity and acceleration.
    278         if (this->ball_ != NULL)
     278        if (this->ball_ != nullptr)
    279279        {
    280280            this->ball_->setPosition(Vector3::ZERO);
     
    285285
    286286        // If there are bats reset them to the middle position.
    287         if (this->bat_[0] != NULL && this->bat_[1] != NULL)
     287        if (this->bat_[0] != nullptr && this->bat_[1] != nullptr)
    288288        {
    289289            this->bat_[0]->setPosition(-this->center_->getFieldDimension().x / 2, 0, 0);
     
    292292
    293293        // If a player gets enough points, he won the game -> end of game
    294         PlayerInfo* winningPlayer = NULL;
     294        PlayerInfo* winningPlayer = nullptr;
    295295        if (this->getLeftPlayer() && this->getScore(this->getLeftPlayer()) >= scoreLimit_)
    296296            winningPlayer = this->getLeftPlayer();
     
    314314    void Pong::startBall()
    315315    {
    316         if (this->ball_ != NULL && this->center_ != NULL)
     316        if (this->ball_ != nullptr && this->center_ != nullptr)
    317317            this->ball_->setSpeed(this->center_->getBallSpeed());
    318318    }
     
    322322        Get the left player.
    323323    @return
    324         Returns a pointer to the player playing on the left. If there is no left player, NULL is returned.
     324        Returns a pointer to the player playing on the left. If there is no left player, nullptr is returned.
    325325    */
    326326    PlayerInfo* Pong::getLeftPlayer() const
    327327    {
    328         if (this->bat_ != NULL && this->bat_[0] != NULL)
     328        if (this->bat_ != nullptr && this->bat_[0] != nullptr)
    329329            return this->bat_[0]->getPlayer();
    330330        else
     
    336336        Get the right player.
    337337    @return
    338         Returns a pointer to the player playing on the right. If there is no right player, NULL is returned.
     338        Returns a pointer to the player playing on the right. If there is no right player, nullptr is returned.
    339339    */
    340340    PlayerInfo* Pong::getRightPlayer() const
    341341    {
    342         if (this->bat_ != NULL && this->bat_[1] != NULL)
     342        if (this->bat_ != nullptr && this->bat_[1] != nullptr)
    343343            return this->bat_[1]->getPlayer();
    344344        else
  • code/branches/cpp11_v2/src/modules/pong/PongAI.cc

    r10727 r10765  
    101101    {
    102102        // If either the ball, or the controllable entity (i.e. the bat) don't exist (or aren't set).
    103         if (this->ball_  == NULL || this->getControllableEntity() == NULL)
     103        if (this->ball_  == nullptr || this->getControllableEntity() == nullptr)
    104104            return;
    105105
  • code/branches/cpp11_v2/src/modules/pong/PongBall.cc

    r9945 r10765  
    163163            float distance = 0;
    164164
    165             if (this->bat_ != NULL) // If there are bats.
     165            if (this->bat_ != nullptr) // If there are bats.
    166166            {
    167167                // If the right boundary has been crossed.
    168                 if (position.x > this->fieldWidth_ / 2 && this->bat_[1] != NULL)
     168                if (position.x > this->fieldWidth_ / 2 && this->bat_[1] != nullptr)
    169169                {
    170170                    // Calculate the distance (in z-direction) between the ball and the center of the bat, weighted by half of the effective length of the bat (with additional 10%)
     
    195195                }
    196196                // If the left boundary has been crossed.
    197                 else if (position.x < -this->fieldWidth_ / 2 && this->bat_[0] != NULL)
     197                else if (position.x < -this->fieldWidth_ / 2 && this->bat_[0] != nullptr)
    198198                {
    199199                    // Calculate the distance (in z-direction) between the ball and the center of the bat, weighted by half of the effective length of the bat (with additional 10%)
     
    285285    {
    286286        // Make space for the bats, if they don't exist, yet.
    287         if (this->bat_ == NULL)
     287        if (this->bat_ == nullptr)
    288288        {
    289289            this->bat_ = new WeakPtr<PongBat>[2];
  • code/branches/cpp11_v2/src/modules/pong/PongCenterpoint.cc

    r10624 r10765  
    8484    void PongCenterpoint::checkGametype()
    8585    {
    86         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Pong)))
     86        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Pong)))
    8787        {
    8888            Pong* pongGametype = orxonox_cast<Pong*>(this->getGametype());
  • code/branches/cpp11_v2/src/modules/pong/PongScore.cc

    r10624 r10765  
    9797
    9898        // If the owner is set. The owner being a Pong game.
    99         if (this->owner_ != NULL)
     99        if (this->owner_ != nullptr)
    100100        {
    101101            if (!this->owner_->hasEnded())
     
    113113
    114114            // Save the name and score of each player as a string.
    115             if (player1_ != NULL)
     115            if (player1_ != nullptr)
    116116            {
    117117                name1 = player1_->getName();
    118118                score1 = multi_cast<std::string>(this->owner_->getScore(player1_));
    119119            }
    120             if (player2_ != NULL)
     120            if (player2_ != nullptr)
    121121            {
    122122                name2 = player2_->getName();
     
    128128            if (this->bShowLeftPlayer_)
    129129            {
    130                 if (this->bShowName_ && this->bShowScore_ && player1_ != NULL)
     130                if (this->bShowName_ && this->bShowScore_ && player1_ != nullptr)
    131131                    output1 = name1 + " - " + score1;
    132132                else if (this->bShowScore_)
     
    139139            if (this->bShowRightPlayer_)
    140140            {
    141                 if (this->bShowName_ && this->bShowScore_ && player2_ != NULL)
     141                if (this->bShowName_ && this->bShowScore_ && player2_ != nullptr)
    142142                    output2 = score2 + " - " + name2;
    143143                else if (this->bShowScore_)
     
    163163    @brief
    164164        Is called when the owner changes.
    165         Sets the owner to NULL, if it is not a pointer to a Pong game.
     165        Sets the owner to nullptr, if it is not a pointer to a Pong game.
    166166    */
    167167    void PongScore::changedOwner()
     
    169169        SUPER(PongScore, changedOwner);
    170170
    171         if (this->getOwner() != NULL && this->getOwner()->getGametype())
     171        if (this->getOwner() != nullptr && this->getOwner()->getGametype())
    172172            this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype());
    173173        else
  • code/branches/cpp11_v2/src/modules/portals/PortalEndPoint.cc

    r9667 r10765  
    4848    std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s;
    4949
    50     PortalEndPoint::PortalEndPoint(Context* context) : StaticEntity(context), RadarViewable(this, static_cast<WorldEntity*>(this)), id_(0), trigger_(NULL), reenterDelay_(0)
     50    PortalEndPoint::PortalEndPoint(Context* context) : StaticEntity(context), RadarViewable(this, static_cast<WorldEntity*>(this)), id_(0), trigger_(nullptr), reenterDelay_(0)
    5151    {
    5252        RegisterObject(PortalEndPoint);
     
    7070    PortalEndPoint::~PortalEndPoint()
    7171    {
    72         if(this->isInitialized() && this->trigger_ != NULL)
     72        if(this->isInitialized() && this->trigger_ != nullptr)
    7373            delete this->trigger_;
    7474    }
  • code/branches/cpp11_v2/src/modules/questsystem/GlobalQuest.cc

    r9667 r10765  
    138138    bool GlobalQuest::isStartable(const PlayerInfo* player) const
    139139    {
    140         if(!(this->getParentQuest() == NULL || this->getParentQuest()->isActive(player)))
     140        if(!(this->getParentQuest() == nullptr || this->getParentQuest()->isActive(player)))
    141141            return false;
    142142
     
    198198        The status to be set.
    199199    @return
    200         Returns false if player is NULL.
     200        Returns false if player is nullptr.
    201201    */
    202202    bool GlobalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
     
    249249            i--;
    250250        }
    251         return NULL;
     251        return nullptr;
    252252    }
    253253
  • code/branches/cpp11_v2/src/modules/questsystem/LocalQuest.cc

    r9667 r10765  
    128128    bool LocalQuest::isStartable(const PlayerInfo* player) const
    129129    {
    130         if(!(this->getParentQuest() == NULL || this->getParentQuest()->isActive(player)))
     130        if(!(this->getParentQuest() == nullptr || this->getParentQuest()->isActive(player)))
    131131            return false;
    132132
     
    188188        The status to be set.
    189189    @return
    190         Returns false if player is NULL.
     190        Returns false if player is nullptr.
    191191    */
    192192    bool LocalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
  • code/branches/cpp11_v2/src/modules/questsystem/Quest.cc

    r10624 r10765  
    5555        RegisterObject(Quest);
    5656
    57         this->parentQuest_ = NULL;
     57        this->parentQuest_ = nullptr;
    5858    }
    5959
     
    183183        The index.
    184184    @return
    185         Returns a pointer to the sub-quest at the given index. NULL if there is no element at the given index.
     185        Returns a pointer to the sub-quest at the given index. nullptr if there is no element at the given index.
    186186    */
    187187    const Quest* Quest::getSubQuest(unsigned int index) const
     
    198198        }
    199199
    200         return NULL; // If the index is greater than the number of elements in the list.
     200        return nullptr; // If the index is greater than the number of elements in the list.
    201201    }
    202202
     
    207207        The index.
    208208    @return
    209         Returns a pointer to the QuestHint at the given index. NULL if there is no element at the given index.
     209        Returns a pointer to the QuestHint at the given index. nullptr if there is no element at the given index.
    210210    */
    211211    const QuestHint* Quest::getHint(unsigned int index) const
     
    221221            i--;
    222222        }
    223         return NULL; // If the index is greater than the number of elements in the list.
     223        return nullptr; // If the index is greater than the number of elements in the list.
    224224    }
    225225
     
    230230        The index.
    231231    @return
    232         Returns a pointer to the fail QuestEffect at the given index. NULL if there is no element at the given index.
     232        Returns a pointer to the fail QuestEffect at the given index. nullptr if there is no element at the given index.
    233233    */
    234234    const QuestEffect* Quest::getFailEffect(unsigned int index) const
     
    244244            i--;
    245245        }
    246         return NULL; // If the index is greater than the number of elements in the list.
     246        return nullptr; // If the index is greater than the number of elements in the list.
    247247    }
    248248
     
    253253        The index.
    254254    @return
    255         Returns a pointer to the complete QuestEffect at the given index. NULL if there is no element at the given index.
     255        Returns a pointer to the complete QuestEffect at the given index. nullptr if there is no element at the given index.
    256256    */
    257257    const QuestEffect* Quest::getCompleteEffect(unsigned int index) const
     
    267267            i--;
    268268        }
    269         return NULL; // If the index is greater than the number of elements in the list.
     269        return nullptr; // If the index is greater than the number of elements in the list.
    270270    }
    271271
     
    280280    bool Quest::isInactive(const PlayerInfo* player) const
    281281    {
    282         if(player == NULL)
     282        if(player == nullptr)
    283283            return true;
    284284        return this->getStatus(player) == QuestStatus::Inactive;
     
    295295    bool Quest::isActive(const PlayerInfo* player) const
    296296    {
    297         if(player == NULL)
     297        if(player == nullptr)
    298298            return false;
    299299        return this->getStatus(player) == QuestStatus::Active;
     
    310310    bool Quest::isFailed(const PlayerInfo* player) const
    311311    {
    312         if(player == NULL)
     312        if(player == nullptr)
    313313            return false;
    314314        return this->getStatus(player) == QuestStatus::Failed;
     
    325325    bool Quest::isCompleted(const PlayerInfo* player) const
    326326    {
    327         if(player == NULL)
     327        if(player == nullptr)
    328328            return false;
    329329        return this->getStatus(player) == QuestStatus::Completed;
  • code/branches/cpp11_v2/src/modules/questsystem/QuestEffectBeacon.cc

    r9667 r10765  
    113113
    114114        PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
    115         PlayerInfo* player = NULL;
     115        PlayerInfo* player = nullptr;
    116116
    117117        // If the trigger is a PlayerTrigger.
    118         if(pTrigger != NULL)
     118        if(pTrigger != nullptr)
    119119        {
    120120            if(!pTrigger->isForPlayer())  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
     
    126126            return false;
    127127
    128         if(player == NULL)
     128        if(player == nullptr)
    129129        {
    130130            orxout(verbose, context::quests) << "The QuestEffectBeacon was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << endl;
     
    243243            i--;
    244244        }
    245         return NULL;
     245        return nullptr;
    246246    }
    247247
  • code/branches/cpp11_v2/src/modules/questsystem/QuestHint.cc

    r9667 r10765  
    8888    bool QuestHint::isActive(const PlayerInfo* player) const
    8989    {
    90         if(player == NULL) // If the player is NULL, the Quest obviously can't be active.
     90        if(player == nullptr) // If the player is nullptr, the Quest obviously can't be active.
    9191            return false;
    9292
  • code/branches/cpp11_v2/src/modules/questsystem/QuestListener.cc

    r9667 r10765  
    5959
    6060        this->mode_ = QuestListenerMode::All;
    61         this->quest_ = NULL;
     61        this->quest_ = nullptr;
    6262    }
    6363
     
    8181        XMLPortParam(QuestListener, "mode", setMode, getMode, xmlelement, mode);
    8282
    83         if(this->quest_ != NULL)
     83        if(this->quest_ != nullptr)
    8484            this->quest_->addListener(this); // Adds the QuestListener to the Quests list of listeners.
    8585
     
    117117        this->quest_ = QuestManager::getInstance().findQuest(id); // Find the Quest corresponding to the given questId.
    118118
    119         if(this->quest_ == NULL) // If there is no such Quest.
     119        if(this->quest_ == nullptr) // If there is no such Quest.
    120120        {
    121121            ThrowException(Argument, "This is bad! The QuestListener has not found a Quest with a corresponding id..");
  • code/branches/cpp11_v2/src/modules/questsystem/QuestManager.cc

    r10624 r10765  
    9393    bool QuestManager::registerQuest(Quest* quest)
    9494    {
    95         if(quest == NULL)
    96         {
    97             orxout(internal_error, context::quests) << "Quest pointer is NULL." << endl;
     95        if(quest == nullptr)
     96        {
     97            orxout(internal_error, context::quests) << "Quest pointer is nullptr." << endl;
    9898            return false;
    9999        }
     
    135135    bool QuestManager::registerHint(QuestHint* hint)
    136136    {
    137         if(hint == NULL)
    138         {
    139             orxout(internal_error, context::quests) << "Quest pointer is NULL." << endl;
     137        if(hint == nullptr)
     138        {
     139            orxout(internal_error, context::quests) << "Quest pointer is nullptr." << endl;
    140140            return false;
    141141        }
     
    173173    @return
    174174        Returns a pointer to the Quest with the input id.
    175         Returns NULL if there is no Quest with the given questId.
     175        Returns nullptr if there is no Quest with the given questId.
    176176    @throws
    177177        Throws an exception if the given questId is invalid.
     
    188188        else
    189189        {
    190            quest = NULL;
     190           quest = nullptr;
    191191           orxout(internal_warning, context::quests) << "The quest with id {" << questId << "} is nowhere to be found." << endl;
    192192        }
     
    202202    @return
    203203        Returns a pointer to the QuestHint with the input id.
    204         Returns NULL if there is no QuestHint with the given hintId.
     204        Returns nullptr if there is no QuestHint with the given hintId.
    205205    @throws
    206206        Throws an exception if the given hintId is invalid.
     
    217217        else
    218218        {
    219            hint = NULL;
     219           hint = nullptr;
    220220           orxout(internal_warning, context::quests) << "The hint with id {" << hintId << "} is nowhere to be found." << endl;
    221221        }
     
    237237        for(std::map<std::string, Quest*>::iterator it = this->questMap_.begin(); it != this->questMap_.end(); it++)
    238238        {
    239             if(it->second->getParentQuest() == NULL && !it->second->isInactive(player))
     239            if(it->second->getParentQuest() == nullptr && !it->second->isInactive(player))
    240240                numQuests++;
    241241        }
     
    257257        for(std::map<std::string, Quest*>::iterator it = this->questMap_.begin(); it != this->questMap_.end(); it++)
    258258        {
    259             if(it->second->getParentQuest() == NULL && !it->second->isInactive(player) && index-- == 0)
     259            if(it->second->getParentQuest() == nullptr && !it->second->isInactive(player) && index-- == 0)
    260260                return it->second;
    261261        }
    262         return NULL;
     262        return nullptr;
    263263    }
    264264
     
    275275    int QuestManager::getNumSubQuests(Quest* quest, PlayerInfo* player)
    276276    {
    277         if(quest == NULL)
     277        if(quest == nullptr)
    278278            return this->getNumRootQuests(player);
    279279
     
    300300    Quest* QuestManager::getSubQuest(Quest* quest, PlayerInfo* player, int index)
    301301    {
    302         if(quest == NULL)
     302        if(quest == nullptr)
    303303            return this->getRootQuest(player, index);
    304304
     
    309309                return *it;
    310310        }
    311         return NULL;
     311        return nullptr;
    312312    }
    313313
     
    354354                return *it;
    355355        }
    356         return NULL;
     356        return nullptr;
    357357    }
    358358
     
    367367    Quest* QuestManager::getParentQuest(Quest* quest)
    368368    {
    369         OrxAssert(quest, "The input Quest is NULL.");
     369        OrxAssert(quest, "The input Quest is nullptr.");
    370370        return quest->getParentQuest();
    371371    }
     
    381381    QuestDescription* QuestManager::getDescription(Quest* item)
    382382    {
    383         OrxAssert(item, "The input Quest is NULL.");
     383        OrxAssert(item, "The input Quest is nullptr.");
    384384        return item->getDescription();
    385385    }
     
    395395    QuestDescription* QuestManager::getDescription(QuestHint* item)
    396396    {
    397         OrxAssert(item, "The input QuestHint is NULL.");
     397        OrxAssert(item, "The input QuestHint is nullptr.");
    398398        return item->getDescription();
    399399    }
     
    409409    const std::string QuestManager::getId(Quest* item) const
    410410    {
    411         OrxAssert(item, "The input Quest is NULL.");
     411        OrxAssert(item, "The input Quest is nullptr.");
    412412        return item->getId();
    413413    }
     
    423423    const std::string QuestManager::getId(QuestHint* item) const
    424424    {
    425         OrxAssert(item, "The input QuestHint is NULL.");
     425        OrxAssert(item, "The input QuestHint is nullptr.");
    426426        return item->getId();
    427427    }
     
    440440    {
    441441        PlayerInfo* player = GUIManager::getInstance().getPlayer(guiName);
    442         if(player == NULL)
     442        if(player == nullptr)
    443443        {
    444444            orxout(internal_error, context::quests) << "GUIOverlay with name '" << guiName << "' has no player." << endl;
    445             return NULL;
     445            return nullptr;
    446446        }
    447447
  • code/branches/cpp11_v2/src/modules/questsystem/effects/AddQuest.cc

    r9667 r10765  
    9090        {
    9191            Quest* quest = QuestManager::getInstance().findQuest(this->getQuestId());
    92             if(quest == NULL || !quest->start(player))
     92            if(quest == nullptr || !quest->start(player))
    9393               return false;
    9494        }
  • code/branches/cpp11_v2/src/modules/questsystem/effects/AddQuestHint.cc

    r9667 r10765  
    113113        {
    114114            QuestHint* hint = QuestManager::getInstance().findHint(this->hintId_);
    115             if(hint == NULL || !hint->setActive(player))
     115            if(hint == nullptr || !hint->setActive(player))
    116116                return false;
    117117        }
  • code/branches/cpp11_v2/src/modules/questsystem/effects/AddReward.cc

    r9667 r10765  
    9090            i--;
    9191        }
    92         return NULL;
     92        return nullptr;
    9393    }
    9494
  • code/branches/cpp11_v2/src/modules/questsystem/effects/CompleteQuest.cc

    r9667 r10765  
    9292        {
    9393            quest = QuestManager::getInstance().findQuest(this->getQuestId());
    94             if(quest == NULL || !quest->complete(player))
     94            if(quest == nullptr || !quest->complete(player))
    9595               return false;
    9696        }
  • code/branches/cpp11_v2/src/modules/questsystem/effects/FailQuest.cc

    r9667 r10765  
    9191        {
    9292            quest = QuestManager::getInstance().findQuest(this->getQuestId());
    93             if(quest == NULL || !quest->fail(player))
     93            if(quest == nullptr || !quest->fail(player))
    9494               return false;
    9595        }
  • code/branches/cpp11_v2/src/modules/tetris/Tetris.cc

    r10624 r10765  
    7272        this->starttimer_.stopTimer();
    7373
    74         this->player_ = NULL;
     74        this->player_ = nullptr;
    7575        this->setHUDTemplate("TetrisHUD");
    7676        this->futureBrick_ = 0;
     
    113113        SUPER(Tetris, tick, dt);
    114114
    115         if((this->activeBrick_ != NULL)&&(!this->hasEnded()))
     115        if((this->activeBrick_ != nullptr)&&(!this->hasEnded()))
    116116        {
    117117            if(!this->isValidBrickPosition(this->activeBrick_))
     
    290290    void Tetris::start()
    291291    {
    292         if (this->center_ != NULL) // There needs to be a TetrisCenterpoint, i.e. the area the game takes place.
     292        if (this->center_ != nullptr) // There needs to be a TetrisCenterpoint, i.e. the area the game takes place.
    293293        {
    294294            // Create the first brick.
     
    323323    {
    324324        this->activeBrick_->setVelocity(Vector3::ZERO);
    325         if(this->activeBrick_ != NULL)
     325        if(this->activeBrick_ != nullptr)
    326326        {
    327327            this->player_->stopControl();
     
    351351        if(player && player->isHumanPlayer())
    352352        {
    353             if(this->activeBrick_ != NULL)
     353            if(this->activeBrick_ != nullptr)
    354354            {
    355355                this->player_->stopControl();
     
    370370        assert(player);
    371371
    372         if(this->player_ == NULL)
     372        if(this->player_ == nullptr)
    373373        {
    374374            this->player_ = player;
     
    381381    void Tetris::startBrick(void)
    382382    {
    383         if(this->player_ == NULL)
     383        if(this->player_ == nullptr)
    384384            return;
    385385
    386386        unsigned int cameraIndex = 0;
    387         if(this->activeBrick_ != NULL)
     387        if(this->activeBrick_ != nullptr)
    388388        {
    389389            // Get camera settings
     
    437437        Get the player.
    438438    @return
    439         Returns a pointer to the player. If there is no player, NULL is returned.
     439        Returns a pointer to the player. If there is no player, nullptr is returned.
    440440    */
    441441    PlayerInfo* Tetris::getPlayer(void) const
  • code/branches/cpp11_v2/src/modules/tetris/TetrisBrick.cc

    r10624 r10765  
    8181            this->attach(stone);
    8282            this->formBrick(stone, i);
    83             if(this->tetris_ != NULL)
     83            if(this->tetris_ != nullptr)
    8484            {
    8585                stone->setGame(this->tetris_);
    86                 if(this->tetris_->getCenterpoint() != NULL)
     86                if(this->tetris_->getCenterpoint() != nullptr)
    8787                    stone->addTemplate(this->tetris_->getCenterpoint()->getStoneTemplate());
    8888                else
    89                     orxout()<< "tetris_->getCenterpoint == NULL in TetrisBrick.cc"<< endl;
     89                    orxout()<< "tetris_->getCenterpoint == nullptr in TetrisBrick.cc"<< endl;
    9090            }
    9191            else
    92                 orxout()<< "tetris_ == NULL in TetrisBrick.cc"<< endl;
     92                orxout()<< "tetris_ == nullptr in TetrisBrick.cc"<< endl;
    9393        }
    9494    }
     
    161161        if(i < this->brickStones_.size())
    162162            return this->brickStones_[i];
    163         else return NULL;
     163        else return nullptr;
    164164    }
    165165
     
    167167    Tetris* TetrisBrick::getTetris()
    168168    {
    169         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
     169        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Tetris)))
    170170        {
    171171            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
    172172            return tetrisGametype;
    173173        }
    174         return NULL;
     174        return nullptr;
    175175    }
    176176
  • code/branches/cpp11_v2/src/modules/tetris/TetrisCenterpoint.cc

    r10624 r10765  
    8484    void TetrisCenterpoint::checkGametype()
    8585    {
    86         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
     86        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Tetris)))
    8787        {
    8888            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
  • code/branches/cpp11_v2/src/modules/tetris/TetrisScore.cc

    r10624 r10765  
    5757
    5858        this->owner_ = 0;
    59         this->player_ = NULL;
     59        this->player_ = nullptr;
    6060    }
    6161
     
    8989
    9090        // If the owner is set. The owner being a Tetris game.
    91         if (this->owner_ != NULL)
     91        if (this->owner_ != nullptr)
    9292        {
    9393            std::string score("0");
     
    101101            {
    102102                // Save the name and score of each player as a string.
    103                 if (player_ != NULL)
     103                if (player_ != nullptr)
    104104                    score = multi_cast<std::string>(this->owner_->getScore(player_));
    105105            }
     
    111111    @brief
    112112        Is called when the owner changes.
    113         Sets the owner to NULL, if it is not a pointer to a Tetris game.
     113        Sets the owner to nullptr, if it is not a pointer to a Tetris game.
    114114    */
    115115    void TetrisScore::changedOwner()
     
    117117        SUPER(TetrisScore, changedOwner);
    118118
    119         if (this->getOwner() != NULL && this->getOwner()->getGametype())
     119        if (this->getOwner() != nullptr && this->getOwner()->getGametype())
    120120            this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype());
    121121        else
  • code/branches/cpp11_v2/src/modules/towerdefense/TowerDefense.cc

    r10727 r10765  
    9090        RegisterObject(TowerDefense);
    9191
    92         selecter = NULL;
    93         this->player_ = NULL;       
     92        selecter = nullptr;
     93        this->player_ = nullptr;
    9494        this->setHUDTemplate("TowerDefenseHUD");
    9595        this->waveNumber_ = 0;
     
    117117    void TowerDefense::start()
    118118    {       
    119         if (center_ != NULL) // There needs to be a TowerDefenseCenterpoint, i.e. the area the game takes place.
    120         {
    121             if (selecter == NULL)
     119        if (center_ != nullptr) // There needs to be a TowerDefenseCenterpoint, i.e. the area the game takes place.
     120        {
     121            if (selecter == nullptr)
    122122            {
    123123                selecter = new TowerDefenseSelecter(this->center_->getContext());               
     
    176176        WaypointController* controller = (WaypointController*)(en1->getXMLController());
    177177
    178         if (controller != NULL && waypoints_.size() > 1)
     178        if (controller != nullptr && waypoints_.size() > 1)
    179179        {
    180180            en1->setPosition(waypoints_.at(0)->getPosition() + offset_);
     
    208208        player_ = player;
    209209
    210         if (selecter->getPlayer() == NULL)
     210        if (selecter->getPlayer() == nullptr)
    211211        {
    212212            player_->startControl(selecter);
     
    219219        Get the player.
    220220    @return
    221         Returns a pointer to the player. If there is no player, NULL is returned.
     221        Returns a pointer to the player. If there is no player, nullptr is returned.
    222222    */
    223223    PlayerInfo* TowerDefense::getPlayer(void) const
     
    265265        SUPER(TowerDefense, tick, dt);
    266266
    267         if (hasStarted() == false || player_ == NULL)
     267        if (hasStarted() == false || player_ == nullptr)
    268268        {
    269269            return;
     
    273273
    274274        //build/upgrade tower at selecter position
    275         if (selecter != NULL && selecter->buildTower_ == true)
     275        if (selecter != nullptr && selecter->buildTower_ == true)
    276276        {
    277277            selecter->buildTower_ = false;
     
    289289        for (std::list<WeakPtr<TowerDefenseEnemy> >::iterator it = enemies_.begin(); it != enemies_.end(); )
    290290        {
    291             if (*it == NULL)
     291            if (*it == nullptr)
    292292            {
    293293                // the enemy was destroyed by a tower - remove it from the list
     
    365365        TDCoordinate* thisCoord = &startCoord;
    366366        TDCoordinate* nextCoord;
    367         while ((nextCoord = getNextStreetCoord(thisCoord)) != NULL)
     367        while ((nextCoord = getNextStreetCoord(thisCoord)) != nullptr)
    368368        {
    369369            waypoints_.push_back(fields_[nextCoord->GetX()][nextCoord->GetY()]);           
     
    381381        if (thisField->getType() != STREET && thisField->getType() != START)
    382382        {
    383             return NULL;
     383            return nullptr;
    384384        }
    385385
     
    406406        }
    407407
    408         return NULL;
     408        return nullptr;
    409409    }
    410410}
  • code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseCenterpoint.cc

    r10629 r10765  
    9292    void TowerDefenseCenterpoint::checkGametype()
    9393    {
    94         if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
     94        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(TowerDefense)))
    9595        {
    9696            // Sets the centerpoint of the gametype. The gametype uses this to later spawn in towers, he needs the tower template stored in the center point
  • code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseEnemy.cc

    r10629 r10765  
    4747    WeakPtr<TowerDefense> TowerDefenseEnemy::getGame()
    4848    {
    49         if (game == NULL)
     49        if (game == nullptr)
    5050        {
    5151            for (ObjectList<TowerDefense>::iterator it = ObjectList<TowerDefense>::begin(); it != ObjectList<TowerDefense>::end(); ++it)
  • code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseField.cc

    r10629 r10765  
    4949        RegisterObject(TowerDefenseField);
    5050
    51         tower_ = NULL;
     51        tower_ = nullptr;
    5252        type_ = FREE;
    53         center_ = NULL;
     53        center_ = nullptr;
    5454        upgrade_ = 0;
    5555        setPosition(0,0,0);                           
     
    119119    bool TowerDefenseField::canUpgrade()
    120120    {
    121         if (tower_ != NULL && upgrade_ < 5)
     121        if (tower_ != nullptr && upgrade_ < 5)
    122122        {
    123123            return true;
     
    129129    void TowerDefenseField::setAngle(int newAngle)
    130130    {
    131         if (modelGround_ != NULL)
     131        if (modelGround_ != nullptr)
    132132        {
    133133            switch (newAngle)
     
    152152        }
    153153
    154         if (modelObject_ != NULL)
     154        if (modelObject_ != nullptr)
    155155        {
    156156            switch (newAngle)
     
    185185    {           
    186186        modelGround_->setMeshSource("TD_F1.mesh");
    187         tower_ = NULL;
     187        tower_ = nullptr;
    188188        type_ = FREE;
    189189        setUpgrade(0);
     
    194194    {     
    195195        modelGround_->setMeshSource("TD_S5.mesh");
    196         tower_ = NULL;
     196        tower_ = nullptr;
    197197        type_ = START;
    198198        setUpgrade(0);
     
    204204    {     
    205205        modelGround_->setMeshSource("TD_S4.mesh");
    206         tower_ = NULL;
     206        tower_ = nullptr;
    207207        type_ = END;
    208208        setUpgrade(0);
     
    213213    {     
    214214        modelGround_->setMeshSource("TD_S1.mesh");
    215         tower_ = NULL;
     215        tower_ = nullptr;
    216216        type_ = STREET;
    217217        setUpgrade(0);
     
    222222    {     
    223223        modelGround_->setMeshSource("TD_S2.mesh");
    224         tower_ = NULL;
     224        tower_ = nullptr;
    225225        type_ = STREET;
    226226        setUpgrade(0);
     
    231231    {   
    232232        modelGround_->setMeshSource("TD_S3.mesh");
    233         tower_ = NULL;
     233        tower_ = nullptr;
    234234        type_ = STREET;
    235235        setUpgrade(0);
     
    241241        modelGround_->setMeshSource("TD_F1.mesh");
    242242        modelObject_->setMeshSource("TD_O1.mesh");
    243         tower_ = NULL;
     243        tower_ = nullptr;
    244244        type_ = OBSTACLE;
    245245        setUpgrade(0);
     
    249249    void TowerDefenseField::createTower(int upgrade)
    250250    {       
    251         if (tower_ == NULL)
     251        if (tower_ == nullptr)
    252252        {
    253253            modelGround_->setMeshSource("TD_F1.mesh");
     
    256256            type_ = TOWER;
    257257            setUpgrade(upgrade);
    258             if (upgrade_ > 0 && modelObject_ != NULL)
     258            if (upgrade_ > 0 && modelObject_ != nullptr)
    259259            {
    260260                switch (upgrade_)
     
    287287    void TowerDefenseField::destroyTower()
    288288    {
    289         if (tower_ != NULL)
     289        if (tower_ != nullptr)
    290290        {
    291291            tower_->destroy();
    292             tower_ = NULL;
     292            tower_ = nullptr;
    293293        }
    294294    }
  • code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseTower.cc

    r10727 r10765  
    2525    {
    2626        RegisterObject(TowerDefenseTower);
    27         game_ =NULL;
     27        game_ =nullptr;
    2828        this->setCollisionType(WorldEntity::None);
    2929        upgrade = 1;
  • code/branches/cpp11_v2/src/modules/weapons/IceGunFreezer.cc

    r10629 r10765  
    101101
    102102        // Check if the freezer is attached to a parent and check if the parent is a SpaceShip
    103         if (parent != NULL && parent->isA(Class(SpaceShip)))
     103        if (parent != nullptr && parent->isA(Class(SpaceShip)))
    104104        {
    105105            freezedSpaceShip_ = orxonox_cast<SpaceShip*>(parent);
     
    118118    void IceGunFreezer::stopFreezing()
    119119    {
    120         if (freezedSpaceShip_ != NULL && freezeFactor_ != 0.0)
     120        if (freezedSpaceShip_ != nullptr && freezeFactor_ != 0.0)
    121121        {
    122122            freezedSpaceShip_->addSpeedFactor(1/freezeFactor_);
  • code/branches/cpp11_v2/src/modules/weapons/projectiles/BasicProjectile.cc

    r10293 r10765  
    8888                                    // The projectile is destroyed by its tick()-function (in the following tick).
    8989
    90             Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is NULL
     90            Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is nullptr
    9191
    9292            WorldEntity* entity = orxonox_cast<WorldEntity*>(this);
     
    146146    bool BasicProjectile::isObjectRelatedToShooter(WorldEntity* otherObject)
    147147    {
    148         for (WorldEntity* shooter = this->getShooter(); shooter != NULL; shooter = shooter->getParent())
     148        for (WorldEntity* shooter = this->getShooter(); shooter != nullptr; shooter = shooter->getParent())
    149149            if (otherObject == shooter)
    150150                return true;
    151         for (WorldEntity* object = otherObject; object != NULL; object = object->getParent())
     151        for (WorldEntity* object = otherObject; object != nullptr; object = object->getParent())
    152152            if (otherObject == this->getShooter())
    153153                return true;
  • code/branches/cpp11_v2/src/modules/weapons/projectiles/GravityBombField.cc

    r10622 r10765  
    137137                        float damage = FORCE_FIELD_EXPLOSION_DAMMAGE*(1-distanceVector.length()/EXPLOSION_RADIUS);
    138138                        //orxout(debug_output) << "Damage: " << damage << endl;
    139                         it->hit(shooter_, it->getWorldPosition(), NULL, damage, 0,0);
     139                        it->hit(shooter_, it->getWorldPosition(), nullptr, damage, 0,0);
    140140                        victimsAlreadyDamaged_.push_back(*it);
    141141                    }
  • code/branches/cpp11_v2/src/modules/weapons/projectiles/Projectile.cc

    r10629 r10765  
    9494    void Projectile::setCollisionShapeRadius(float radius)
    9595    {
    96         if (collisionShape_ != NULL && radius > 0)
     96        if (collisionShape_ != nullptr && radius > 0)
    9797        {
    9898            collisionShape_->setRadius(radius);
Note: See TracChangeset for help on using the changeset viewer.