Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

replace 'NULL' by 'nullptr'

Location:
code/branches/cpp11_v2/src/orxonox
Files:
41 edited

Legend:

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

    r10624 r10765  
    9393                this->cameraList_.front()->setFocus();
    9494            else
    95                 this->useCamera(NULL);
     95                this->useCamera(nullptr);
    9696        }
    9797        else
  • code/branches/cpp11_v2/src/orxonox/LevelManager.cc

    r10624 r10765  
    154154        Get the currently active Level.
    155155    @return
    156         Returns a pointer to the currently active level or NULL if there currently are no active Levels.
     156        Returns a pointer to the currently active level or nullptr if there currently are no active Levels.
    157157    */
    158158    Level* LevelManager::getActiveLevel()
     
    218218    {
    219219        if(index >= this->availableLevels_.size())
    220             return NULL;
     220            return nullptr;
    221221
    222222        // If this index directly follows the last we can optimize a lot.
     
    272272            if (it->find("old/") != 0)
    273273            {
    274                 LevelInfoItem* info = NULL;
     274                LevelInfoItem* info = nullptr;
    275275
    276276                // Load the LevelInfo object from the level file.
     
    286286                Loader::getInstance().unload(&file);
    287287
    288                 if(info == NULL)
     288                if(info == nullptr)
    289289                {
    290290                    // Create a default LevelInfoItem object that merely contains the name
  • code/branches/cpp11_v2/src/orxonox/Scene.cc

    r10727 r10765  
    6666        this->bShadows_ = true;
    6767        this->bDebugDrawPhysics_ = false;
    68         this->debugDrawer_ = NULL;
     68        this->debugDrawer_ = nullptr;
    6969        this->soundReferenceDistance_ = 20.0;
    7070        this->bIsUpdatingPhysics_ = false;
  • code/branches/cpp11_v2/src/orxonox/chat/ChatInputHandler.cc

    r10624 r10765  
    7979    this->inpbuf = new InputBuffer();
    8080    this->disp_offset = 0;
    81     assert( this->inpbuf != NULL );
     81    assert( this->inpbuf != nullptr );
    8282
    8383    /* generate chatbox ui and chatbox-inputonly ui */
  • code/branches/cpp11_v2/src/orxonox/collisionshapes/CollisionShape.h

    r9667 r10765  
    181181
    182182            btCollisionShape*       collisionShape_; //!< The bullet collision shape of this CollisionShape.
    183             CompoundCollisionShape* parent_; //!< The CompoundCollisionShape this CollisionShape belongs to, NULL if it doesn't belong to one.
     183            CompoundCollisionShape* parent_; //!< The CompoundCollisionShape this CollisionShape belongs to, nullptr if it doesn't belong to one.
    184184            unsigned int            parentID_; //!< The objectID of the parent of this CollisionShape, which can either be a CompoundCollisionShape or a WorldEntity.
    185185
  • code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc

    r10624 r10765  
    7272                it->first->destroy();
    7373                if (this->collisionShape_ == it->second)
    74                     this->collisionShape_ = NULL; // don't destroy it twice
     74                    this->collisionShape_ = nullptr; // don't destroy it twice
    7575            }
    7676
    7777            delete this->compoundShape_;
    7878            if (this->collisionShape_ == this->compoundShape_)
    79                 this->collisionShape_ = NULL; // don't destroy it twice
     79                this->collisionShape_ = nullptr; // don't destroy it twice
    8080        }
    8181    }
     
    9696    void CompoundCollisionShape::attach(CollisionShape* shape)
    9797    {
    98         // If either the input shape is NULL or we try to attach the CollisionShape to itself.
     98        // If either the input shape is nullptr or we try to attach the CollisionShape to itself.
    9999        if (!shape || static_cast<CollisionShape*>(this) == shape)
    100100            return;
  • code/branches/cpp11_v2/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc

    r10624 r10765  
    4343        RegisterObject(WorldEntityCollisionShape);
    4444
    45         this->worldEntityOwner_ = NULL;
     45        this->worldEntityOwner_ = nullptr;
    4646        // suppress synchronisation
    4747        this->setSyncMode(ObjectDirection::None);
  • code/branches/cpp11_v2/src/orxonox/controllers/AIController.cc

    r9667 r10765  
    249249            }
    250250            else
    251                 this->setPreviousMode();//If bot dies -> getControllableEntity == NULL -> get out of ROCKET mode
     251                this->setPreviousMode();//If bot dies -> getControllableEntity == nullptr -> get out of ROCKET mode
    252252        }//END_OF ROCKET MODE
    253253
  • code/branches/cpp11_v2/src/orxonox/controllers/ArtificialController.cc

    r10733 r10765  
    5656        this->currentWaypoint_ = 0;
    5757        this->setAccuracy(5);
    58         this->defaultWaypoint_ = NULL;
     58        this->defaultWaypoint_ = nullptr;
    5959        this->mode_ = DEFAULT;//Vector-implementation: mode_.push_back(DEFAULT);
    6060    }
     
    222222    {
    223223        SpaceShip* ship = orxonox_cast<SpaceShip*>(this->getControllableEntity());
    224         if(ship == NULL) return;
     224        if(ship == nullptr) return;
    225225        if(ship->getBoostPower()*1.5f > ship->getInitialBoostPower() ) //upper limit ->boost
    226226            this->getControllableEntity()->boost(true);
     
    258258    void ArtificialController::updatePointsOfInterest(std::string name, float searchDistance)
    259259    {
    260         WorldEntity* waypoint = NULL;
     260        WorldEntity* waypoint = nullptr;
    261261        for (WorldEntity* we : ObjectList<WorldEntity>())
    262262        {
  • code/branches/cpp11_v2/src/orxonox/controllers/ControllerDirector.cc

    r10622 r10765  
    3232
    3333        // Initialize member variables
    34         this->player_ = NULL;
    35         this->entity_ = NULL;
    36         this->pTrigger_ = NULL;
     34        this->player_ = nullptr;
     35        this->entity_ = nullptr;
     36        this->pTrigger_ = nullptr;
    3737        this->context_ = context;
    3838    }
     
    110110    {
    111111        this->pTrigger_ = orxonox_cast<PlayerTrigger*>(trigger);
    112         this->player_ = NULL;
     112        this->player_ = nullptr;
    113113
    114114        orxout(verbose) << "Preparation to take Control!" << endl;
    115115
    116116        // Check whether it is a player trigger and extract pawn from it
    117         if(this->pTrigger_ != NULL)
     117        if(this->pTrigger_ != nullptr)
    118118        {
    119119            // Get the object which triggered the event.
     
    121121
    122122            // Check if there actually was a player returned.
    123             if( this->player_ == NULL) return false;
     123            if( this->player_ == nullptr) return false;
    124124        }
    125125        else
  • code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc

    r10631 r10765  
    773773    {
    774774
    775         Pawn *humanPawn = NULL;
    776         NewHumanController *currentHumanController = NULL;
     775        Pawn *humanPawn = nullptr;
     776        NewHumanController *currentHumanController = nullptr;
    777777        std::vector<FormationController*> allMasters;
    778778
     
    800800        }
    801801
    802         if((humanPawn != NULL) && (allMasters.size() != 0))
     802        if((humanPawn != nullptr) && (allMasters.size() != 0))
    803803        {
    804804            float posHuman = humanPawn->getPosition().length();
     
    826826    void FormationController::followInit(Pawn* pawn, const bool always, const int secondsToFollow)
    827827    {
    828         if (pawn == NULL || this->state_ != MASTER)
     828        if (pawn == nullptr || this->state_ != MASTER)
    829829            return;
    830830        this->specificMasterAction_  =  FOLLOW;
     
    844844    {
    845845
    846         Pawn *humanPawn = NULL;
    847         NewHumanController *currentHumanController = NULL;
     846        Pawn *humanPawn = nullptr;
     847        NewHumanController *currentHumanController = nullptr;
    848848
    849849        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
     
    861861        }
    862862
    863         if((humanPawn != NULL))
     863        if((humanPawn != nullptr))
    864864                this->followInit(humanPawn);
    865865    }
  • code/branches/cpp11_v2/src/orxonox/controllers/HumanController.cc

    r10624 r10765  
    321321            return orxonox_cast<Pawn*>(HumanController::localController_s->getControllableEntity());
    322322        else
    323             return NULL;
     323            return nullptr;
    324324    }
    325325
  • code/branches/cpp11_v2/src/orxonox/controllers/NewHumanController.cc

    r10631 r10765  
    6262    NewHumanController::NewHumanController(Context* context)
    6363        : HumanController(context)
    64         , crossHairOverlay_(NULL)
    65         , centerOverlay_(NULL)
    66         , damageOverlayTop_(NULL)
    67         , damageOverlayRight_(NULL)
    68         , damageOverlayBottom_(NULL)
    69         , damageOverlayLeft_(NULL)
     64        , crossHairOverlay_(nullptr)
     65        , centerOverlay_(nullptr)
     66        , damageOverlayTop_(nullptr)
     67        , damageOverlayRight_(nullptr)
     68        , damageOverlayBottom_(nullptr)
     69        , damageOverlayLeft_(nullptr)
    7070        , damageOverlayTT_(0)
    7171        , damageOverlayTR_(0)
    7272        , damageOverlayTB_(0)
    7373        , damageOverlayTL_(0)
    74         , arrowsOverlay1_(NULL)
    75         , arrowsOverlay2_(NULL)
    76         , arrowsOverlay3_(NULL)
    77         , arrowsOverlay4_(NULL)
     74        , arrowsOverlay1_(nullptr)
     75        , arrowsOverlay2_(nullptr)
     76        , arrowsOverlay3_(nullptr)
     77        , arrowsOverlay4_(nullptr)
    7878    {
    7979        RegisterObject(NewHumanController);
  • code/branches/cpp11_v2/src/orxonox/controllers/ScriptController.cc

    r10622 r10765  
    6464        /* Set default values for all variables */
    6565        /* - pointers to zero */
    66         this->player_ = NULL;
    67         this->entity_ = NULL;
     66        this->player_ = nullptr;
     67        this->entity_ = nullptr;
    6868
    6969        /* - times */
     
    138138     
    139139      }
    140       return NULL;
     140      return nullptr;
    141141    }
    142142
  • code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc

    r10624 r10765  
    156156        {
    157157            ModifyConsoleCommand(__CC_changeGame_name).deactivate();
    158             ModifyConsoleCommand(__CC_reloadLevel_name).setObject(NULL).deactivate();
     158            ModifyConsoleCommand(__CC_reloadLevel_name).setObject(nullptr).deactivate();
    159159        }
    160160    }
  • code/branches/cpp11_v2/src/orxonox/gamestates/GSLevelMemento.h

    r10281 r10765  
    4848        protected:
    4949            /**
    50              * Returns the state of this memento. Returns NULL if no state needed to persist.
     50             * Returns the state of this memento. Returns nullptr if no state needed to persist.
    5151             */
    5252            virtual GSLevelMementoState* exportMementoState() = 0;
  • code/branches/cpp11_v2/src/orxonox/gamestates/GSMainMenu.cc

    r10624 r10765  
    7373
    7474        // create an empty Scene
    75         this->scene_ = new Scene(NULL);
     75        this->scene_ = new Scene(nullptr);
    7676        this->scene_->setSyncMode( 0x0 );
    7777        // and a Camera
  • code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc

    r10624 r10765  
    9292                this->gtinfo_->destroy();
    9393
    94             ModifyConsoleCommand(__CC_addBots_name).setObject(NULL);
    95             ModifyConsoleCommand(__CC_killBots_name).setObject(NULL);
     94            ModifyConsoleCommand(__CC_addBots_name).setObject(nullptr);
     95            ModifyConsoleCommand(__CC_killBots_name).setObject(nullptr);
    9696        }
    9797    }
     
    337337        {
    338338            // Fallback spawn point if there is no active one, choose a random one.
    339             SpawnPoint* fallbackSpawnPoint = NULL;
     339            SpawnPoint* fallbackSpawnPoint = nullptr;
    340340            unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(this->spawnpoints_.size())));
    341341            unsigned int index = 0;
     
    346346                    fallbackSpawnPoint = (*it);
    347347
    348                 if (*it != NULL && (*it)->isActive())
     348                if (*it != nullptr && (*it)->isActive())
    349349                    activeSpawnPoints.push_back(*it);
    350350
     
    552552        }
    553553
    554         return NULL;
     554        return nullptr;
    555555    }
    556556
     
    558558    {
    559559        // find correct memento state
    560         GametypeMementoState* state = NULL;
     560        GametypeMementoState* state = nullptr;
    561561        for (size_t i = 0; i < states.size(); ++i)
    562562        {
     
    570570
    571571        // find correct scene
    572         Scene* scene = NULL;
     572        Scene* scene = nullptr;
    573573        for (ObjectList<Scene>::iterator it = ObjectList<Scene>::begin(); it != ObjectList<Scene>::end(); ++it)
    574574        {
  • code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc

    r9941 r10765  
    7575    void TeamGametype::playerEntered(PlayerInfo* player)
    7676    {
    77         if(player == NULL) return; // catch null pointers
     77        if(player == nullptr) return; // catch null pointers
    7878        Gametype::playerEntered(player);
    7979        this->findAndSetTeam(player);
     
    9696    void TeamGametype::findAndSetTeam(PlayerInfo* player)
    9797    {
    98         if(player == NULL) return; // catch null pointers
     98        if(player == nullptr) return; // catch null pointers
    9999        std::vector<unsigned int> playersperteam(this->teams_, 0);
    100100
     
    235235        }
    236236
    237         SpawnPoint* fallbackSpawnPoint = NULL;
     237        SpawnPoint* fallbackSpawnPoint = nullptr;
    238238        if (teamSpawnPoints.size() > 0)
    239239        {
     
    328328    void TeamGametype::setDefaultObjectColour(Pawn* pawn)
    329329    {
    330         if(pawn == NULL)
     330        if(pawn == nullptr)
    331331            return;
    332332
     
    350350        ArtificialController* artificial =  orxonox_cast<ArtificialController*>(controller);
    351351        //get Teamnumber - get the data
    352         if(artificial == NULL)
     352        if(artificial == nullptr)
    353353            return;
    354354        teamnumber= artificial->getTeam();
     
    360360    void TeamGametype::colourPawn(Pawn* pawn, int teamNr)
    361361    {// catch: no-colouring-case and wrong input
    362         if(teamNr < 0 || teamNr+1 > int(this->teamcolours_.size()) ||pawn == NULL) return;
     362        if(teamNr < 0 || teamNr+1 > int(this->teamcolours_.size()) ||pawn == nullptr) return;
    363363        pawn->setRadarObjectColour(this->teamcolours_[teamNr]);
    364364
  • code/branches/cpp11_v2/src/orxonox/graphics/Billboard.cc

    r9667 r10765  
    139139    {
    140140        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
    141         if( bSet != NULL )
     141        if( bSet != nullptr )
    142142        {
    143143            bSet->setBillboardType(bbt);
     
    148148    {
    149149        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
    150         if( bSet != NULL )
     150        if( bSet != nullptr )
    151151        {
    152152            bSet->setCommonDirection( vec );
     
    157157    {
    158158        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
    159         if( bSet != NULL )
     159        if( bSet != nullptr )
    160160        {
    161161            bSet->setCommonUpVector( vec );
     
    166166    {
    167167        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
    168         if( bSet != NULL )
     168        if( bSet != nullptr )
    169169        {
    170170            bSet->setDefaultDimensions(width, height);
  • code/branches/cpp11_v2/src/orxonox/graphics/Model.cc

    r10728 r10765  
    157157                BaseObject* creatorPtr = this;
    158158
    159                 while(creatorPtr!=NULL&&orxonox_cast<WorldEntity*>(creatorPtr))
     159                while(creatorPtr!=nullptr&&orxonox_cast<WorldEntity*>(creatorPtr))
    160160                {
    161161                    scaleFactor *= getBiggestScale(((WorldEntity*) creatorPtr)->getScale3D());
  • code/branches/cpp11_v2/src/orxonox/infos/PlayerInfo.cc

    r10624 r10765  
    181181
    182182        RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity);
    183         if (radarviewable != NULL)
     183        if (radarviewable != nullptr)
    184184            radarviewable->setRadarName(this->getName());
    185185    }
     
    235235
    236236        Controller* tmp =this->controllableEntity_->getController();
    237         if (tmp == NULL)
    238         {
    239             orxout(verbose) <<  "PlayerInfo: pauseControl, Controller is NULL " << endl;
     237        if (tmp == nullptr)
     238        {
     239            orxout(verbose) <<  "PlayerInfo: pauseControl, Controller is nullptr " << endl;
    240240            return;
    241241        }
    242242        tmp->setActive(false);
    243         //this->controllableEntity_->getController()->setControllableEntity(NULL);
     243        //this->controllableEntity_->getController()->setControllableEntity(nullptr);
    244244        this->controllableEntity_->setController(0);
    245245    }
     
    249249        ControllableEntity* entity = this->controllableEntity_;
    250250
    251         assert(this->controllableEntity_ != NULL);
     251        assert(this->controllableEntity_ != nullptr);
    252252        if( !entity || this->previousControllableEntity_.size() == 0 )
    253253            return;
     
    260260        do {
    261261            this->controllableEntity_ = this->previousControllableEntity_.back();
    262         } while(this->controllableEntity_ == NULL && this->previousControllableEntity_.size() > 0);
     262        } while(this->controllableEntity_ == nullptr && this->previousControllableEntity_.size() > 0);
    263263        this->controllableEntityID_ = this->controllableEntity_->getObjectID();
    264264        this->previousControllableEntity_.pop_back();
    265265
    266         if ( this->controllableEntity_ != NULL && this->controller_ != NULL)
     266        if ( this->controllableEntity_ != nullptr && this->controller_ != nullptr)
    267267            this->controller_->setControllableEntity(this->controllableEntity_);
    268268
    269269         // HACK-ish
    270         if(this->controllableEntity_ != NULL && this->isHumanPlayer())
     270        if(this->controllableEntity_ != nullptr && this->isHumanPlayer())
    271271            this->controllableEntity_->createHud();
    272272
  • code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.cc

    r10624 r10765  
    127127    {
    128128        if(!this->isTarget(pickup))
    129             return NULL;
     129            return nullptr;
    130130
    131131        if(pickup->isTarget(this)) // If the PickupCarrier itself is a target.
    132132            return this;
    133133
    134         PickupCarrier* target = NULL;
     134        PickupCarrier* target = nullptr;
    135135        // Go recursively through all children to check whether they are the target.
    136136        std::vector<PickupCarrier*>* children = this->getCarrierChildren();
  • code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.h

    r9667 r10765  
    5959        But this structure has to be established first.
    6060        - <b>getCarrierChildren()</b> To this end a PickupCarrier needs to implement getCarrierChildren() which returns a list of its direct PickupCarrier children. If you need an example, have a look at @ref orxonox::Pawn "Pawn" and @ref orxonox::Engine "Engine".
    61         - <b>getCarrierParent()</b> This is the method in the other direction. It returns the parent of this PickupCarrier, or NULL if the PickupCarrier is a root node in this hierarchy.
     61        - <b>getCarrierParent()</b> This is the method in the other direction. It returns the parent of this PickupCarrier, or nullptr if the PickupCarrier is a root node in this hierarchy.
    6262
    6363    @author
  • code/branches/cpp11_v2/src/orxonox/interfaces/Pickupable.cc

    r10624 r10765  
    5656        RegisterObject(Pickupable);
    5757
    58         this->carrier_ = NULL;
     58        this->carrier_ = nullptr;
    5959
    6060        this->beingDestroyed_ = false;
     
    143143    bool Pickupable::isTarget(const PickupCarrier* carrier) const
    144144    {
    145         if(carrier == NULL)
     145        if(carrier == nullptr)
    146146            return false;
    147147
     
    210210    bool Pickupable::pickup(PickupCarrier* carrier)
    211211    {
    212         if(carrier == NULL || this->isPickedUp()) // If carrier is NULL or the Pickupable is already picked up.
     212        if(carrier == nullptr || this->isPickedUp()) // If carrier is nullptr or the Pickupable is already picked up.
    213213            return false;
    214214
     
    237237            return false;
    238238
    239         assert(this->getCarrier()); // The Carrier cannot be NULL at this point.
     239        assert(this->getCarrier()); // The Carrier cannot be nullptr at this point.
    240240        if(!this->getCarrier()->removePickup(this)) //TODO Shouldn't this be a little later?
    241241            orxout(internal_warning, context::pickups) << "Pickupable (&" << this << ", " << this->getIdentifier()->getName() << ") is being dropped, but it was not present in the PickupCarriers list of pickups." << endl;
     
    249249            created = this->createSpawner();
    250250
    251         this->setCarrier(NULL);
     251        this->setCarrier(nullptr);
    252252
    253253        if(!created && createSpawner) // If a PickupSpawner should have been created but wasn't.
     
    301301        orxout(verbose, context::pickups) << "Pickupable (&" << this << ") changed Carrier (& " << carrier << ")." << endl;
    302302
    303         if(carrier != NULL && tell)
     303        if(carrier != nullptr && tell)
    304304        {
    305305            if(!carrier->addPickup(this))
  • code/branches/cpp11_v2/src/orxonox/items/Engine.cc

    r9667 r10765  
    155155    void Engine::run(float dt)
    156156    {
    157         if (this->ship_ == NULL)
     157        if (this->ship_ == nullptr)
    158158        {
    159159            if (this->shipID_ != 0)
     
    161161                this->networkcallback_shipID();
    162162
    163                 if (this->ship_ == NULL)
     163                if (this->ship_ == nullptr)
    164164                    return;
    165165            }
  • code/branches/cpp11_v2/src/orxonox/items/Engine.h

    r9667 r10765  
    6767            /**
    6868            @brief Get the SpaceShip this Engine is mounted on.
    69             @return Returns a pointer to the SpaceShip. NULL if it isn't mounted on any ship.
     69            @return Returns a pointer to the SpaceShip. nullptr if it isn't mounted on any ship.
    7070            */
    7171            inline SpaceShip* getShip() const
  • code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc

    r9939 r10765  
    205205    void MultiStateEngine::addEffectContainer(EffectContainer* effect)
    206206    {
    207         if (effect == NULL)
     207        if (effect == nullptr)
    208208            return;
    209209        effect->setLuaState(this->lua_, 'f' + multi_cast<std::string>(this->effectContainers_.size()));
     
    224224                return (*it);
    225225        }
    226         return NULL;
     226        return nullptr;
    227227    }
    228228
  • code/branches/cpp11_v2/src/orxonox/items/ShipPart.cc

    r10624 r10765  
    5050
    5151    ShipPart::ShipPart(Context* context)
    52         : Item(context), parent_(NULL)
     52        : Item(context), parent_(nullptr)
    5353    {
    5454        RegisterObject(ShipPart);
     
    122122    void ShipPart::addEntity(StaticEntity* entity)
    123123    {
    124         OrxAssert(entity != NULL, "The Entity cannot be NULL.");
     124        OrxAssert(entity != nullptr, "The Entity cannot be nullptr.");
    125125        this->entityList_.push_back(entity);
    126126    }
     
    130130        Get the i-th StaticEntity of the ShipPart.
    131131    @return
    132         Returns a pointer to the i-the StaticEntity. NULL if there is no StaticEntity with that index.
     132        Returns a pointer to the i-the StaticEntity. nullptr if there is no StaticEntity with that index.
    133133    */
    134134    StaticEntity* ShipPart::getEntity(unsigned int index)
    135135    {
    136136        if(this->entityList_.size() >= index)
    137             return NULL;
     137            return nullptr;
    138138        else
    139139            return this->entityList_[index];
     
    164164    void ShipPart::addDestructionEvent(PartDestructionEvent* event)
    165165    {
    166         OrxAssert(event != NULL, "The PartDestructionEvent cannot be NULL.");
     166        OrxAssert(event != nullptr, "The PartDestructionEvent cannot be nullptr.");
    167167        event->setParent(this);
    168168        this->eventList_.push_back(event);
     
    173173        Get the i-th PartDestructionEvent of the ShipPart.
    174174    @return
    175         Returns a pointer to the i-the PartDestructionEvent. NULL if there is no PartDestructionEvent with that index.
     175        Returns a pointer to the i-the PartDestructionEvent. nullptr if there is no PartDestructionEvent with that index.
    176176    */
    177177    PartDestructionEvent* ShipPart::getDestructionEvent(unsigned int index)
    178178    {
    179179        if(this->eventList_.size() <= index)
    180             return NULL;
     180            return nullptr;
    181181        else
    182182            return this->eventList_[index];
  • code/branches/cpp11_v2/src/orxonox/sound/AmbientSound.cc

    r10624 r10765  
    9393            const std::string& path = "ambient/" + mood + '/' + this->ambientSource_;
    9494            shared_ptr<ResourceInfo> fileInfo = Resource::getInfo(path);
    95             if (fileInfo != NULL)
     95            if (fileInfo != nullptr)
    9696            {
    9797                orxout(user_info) << "Loading ambient sound " << path << "..." << endl; // TODO: make this output internal if we implement sound streaming
  • code/branches/cpp11_v2/src/orxonox/sound/BaseSound.cc

    r10624 r10765  
    6666            this->stop();
    6767        // Release buffer
    68         if (this->soundBuffer_ != NULL)
     68        if (this->soundBuffer_ != nullptr)
    6969        {
    7070            assert(GameMode::playsSound());
     
    8484    {
    8585        this->state_ = Playing;
    86         if (GameMode::playsSound() && this->getSourceState() != AL_PLAYING && this->soundBuffer_ != NULL)
     86        if (GameMode::playsSound() && this->getSourceState() != AL_PLAYING && this->soundBuffer_ != nullptr)
    8787        {
    8888            if (!alIsSource(this->audioSource_))
     
    151151            orxout(internal_warning, context::sound) << "Setting source parameters to 0 failed: "
    152152                                                     << SoundManager::getALErrorString(error) << endl;
    153         assert(this->soundBuffer_ != NULL);
     153        assert(this->soundBuffer_ != nullptr);
    154154        alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer());
    155155        if (ALuint error = alGetError())
     
    209209        }
    210210
    211         if (this->soundBuffer_ != NULL)
     211        if (this->soundBuffer_ != nullptr)
    212212        {
    213213            if (this->soundBuffer_->getFilename() == source)
     
    233233        // Get new sound buffer
    234234        this->soundBuffer_ = SoundManager::getInstance().getSoundBuffer(this->source_);
    235         if (this->soundBuffer_ == NULL)
     235        if (this->soundBuffer_ == nullptr)
    236236            return;
    237237
  • code/branches/cpp11_v2/src/orxonox/sound/SoundBuffer.cc

    r8858 r10765  
    4545    {
    4646        if (this->filename_.empty())
    47             ThrowException(General, "SoundBuffer construction: fileInfo was NULL");
     47            ThrowException(General, "SoundBuffer construction: fileInfo was nullptr");
    4848
    4949        // Get resource info
    5050        shared_ptr<ResourceInfo> fileInfo = Resource::getInfo(filename);
    51         if (fileInfo == NULL)
     51        if (fileInfo == nullptr)
    5252        {
    5353            orxout(internal_error, context::sound) << "Sound file '" << filename << "' not found" << endl;
     
    138138        vorbisCallbacks.seek_func  = &seekVorbis;
    139139        vorbisCallbacks.tell_func  = &tellVorbis;
    140         vorbisCallbacks.close_func = NULL;
     140        vorbisCallbacks.close_func = nullptr;
    141141
    142142        OggVorbis_File vf;
    143         int ret = ov_open_callbacks(dataStream.get(), &vf, NULL, 0, vorbisCallbacks);
     143        int ret = ov_open_callbacks(dataStream.get(), &vf, nullptr, 0, vorbisCallbacks);
    144144        if (ret < 0)
    145145        {
  • code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc

    r10624 r10765  
    8383            ThrowException(InitialisationAborted, "Sound: Not loading at all");
    8484#if !defined(ORXONOX_PLATFORM_APPLE)
    85         if (!alutInitWithoutContext(NULL, NULL))
     85        if (!alutInitWithoutContext(nullptr, nullptr))
    8686            ThrowException(InitialisationFailed, "Sound Error: ALUT initialisation failed: " << alutGetErrorString(alutGetError()));
    8787        Loki::ScopeGuard alutExitGuard = Loki::MakeGuard(&alutExit);
     
    9090/*
    9191        // Get list of available sound devices and display them
    92         const char* devices = alcGetString(NULL, ALC_DEVICE_SPECIFIER);
     92        const char* devices = alcGetString(nullptr, ALC_DEVICE_SPECIFIER);
    9393        char* device = new char[strlen(devices)+1];
    9494        strcpy(device, devices);
     
    110110        this->device_ = alcOpenDevice(renderDevice.c_str());
    111111*/
    112         this->device_ = alcOpenDevice(NULL);
    113         if (this->device_ == NULL)
     112        this->device_ = alcOpenDevice(nullptr);
     113        if (this->device_ == nullptr)
    114114            ThrowException(InitialisationFailed, "Sound Error: Could not open sound device.");
    115115        Loki::ScopeGuard closeDeviceGuard = Loki::MakeGuard(&alcCloseDevice, this->device_);
    116116
    117117        // Create sound context and make it the currently used one
    118         this->context_ = alcCreateContext(this->device_, NULL);
    119         if (this->context_ == NULL)
     118        this->context_ = alcCreateContext(this->device_, nullptr);
     119        if (this->context_ == nullptr)
    120120            ThrowException(InitialisationFailed, "Sound Error: Could not create ALC context");
    121121        Loki::ScopeGuard desroyContextGuard = Loki::MakeGuard(&alcDestroyContext, this->context_);
     
    189189
    190190        // Relieve context to destroy it
    191         if (!alcMakeContextCurrent(NULL))
     191        if (!alcMakeContextCurrent(nullptr))
    192192            orxout(internal_error, context::sound) << "Could not unset ALC context" << endl;
    193193        alcDestroyContext(this->context_);
     
    350350    void SoundManager::registerAmbientSound(AmbientSound* newAmbient)
    351351    {
    352         if (newAmbient != NULL && !this->bDestructorCalled_)
     352        if (newAmbient != nullptr && !this->bDestructorCalled_)
    353353        {
    354354            for (AmbientList::const_iterator it = this->ambientSounds_.begin(); it != this->ambientSounds_.end(); ++it)
     
    373373    void SoundManager::unregisterAmbientSound(AmbientSound* oldAmbient)
    374374    {
    375         if (oldAmbient == NULL || ambientSounds_.empty() || this->bDestructorCalled_)
     375        if (oldAmbient == nullptr || ambientSounds_.empty() || this->bDestructorCalled_)
    376376            return;
    377377
     
    405405    void SoundManager::pauseAmbientSound(AmbientSound* ambient)
    406406    {
    407         if (ambient != NULL)
     407        if (ambient != nullptr)
    408408        {
    409409            for (AmbientList::iterator it = this->ambientSounds_.begin(); it != this->ambientSounds_.end(); ++it)
  • code/branches/cpp11_v2/src/orxonox/sound/SoundStreamer.cc

    r8858 r10765  
    4545        vorbisCallbacks.seek_func  = &seekVorbis;
    4646        vorbisCallbacks.tell_func  = &tellVorbis;
    47         vorbisCallbacks.close_func = NULL;
     47        vorbisCallbacks.close_func = nullptr;
    4848
    4949        OggVorbis_File vf;
    50         int ret = ov_open_callbacks(dataStream.get(), &vf, NULL, 0, vorbisCallbacks);
     50        int ret = ov_open_callbacks(dataStream.get(), &vf, nullptr, 0, vorbisCallbacks);
    5151        if (ret < 0)
    5252        {
  • code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc

    r10624 r10765  
    6262        this->client_overwrite_ = 0;
    6363        this->player_ = 0;
    64         this->formerPlayer_ = NULL;
     64        this->formerPlayer_ = nullptr;
    6565        this->playerID_ = OBJECTID_UNKNOWN;
    6666        this->hud_ = 0;
     
    194194    bool ControllableEntity::setCameraPosition(unsigned int index)
    195195    {
    196         if(this->camera_ != NULL && this->cameraPositions_.size() > 0)
     196        if(this->camera_ != nullptr && this->cameraPositions_.size() > 0)
    197197        {
    198198            if(index >= this->cameraPositions_.size())
     
    350350        this->bHasLocalController_ = player->isLocalPlayer();
    351351        this->bHasHumanController_ = player->isHumanPlayer();
    352         if(controller_ != NULL)
     352        if(controller_ != nullptr)
    353353            this->team_ = controller_->getTeam(); // forward controller team number
    354354
     
    434434    void ControllableEntity::destroyHud(void)
    435435    {
    436         if (this->hud_ != NULL)
     436        if (this->hud_ != nullptr)
    437437        {
    438438            this->hud_->destroy();
    439             this->hud_ = NULL;
     439            this->hud_ = nullptr;
    440440        }
    441441    }
  • code/branches/cpp11_v2/src/orxonox/worldentities/EffectContainer.cc

    r9667 r10765  
    4444    EffectContainer::EffectContainer(Context* context)
    4545        : BaseObject(context)
    46         , lua_(NULL)
     46        , lua_(nullptr)
    4747    {
    4848        RegisterObject(EffectContainer);
     
    9292            if (i == index)
    9393                return (*it);
    94         return NULL;
     94        return nullptr;
    9595    }
    9696
  • code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc

    r10624 r10765  
    563563    void WorldEntity::detachOgreObject(Ogre::MovableObject* object)
    564564    {
    565         object->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(NULL)));
     565        object->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(nullptr)));
    566566        this->node_->detachObject(object);
    567567    }
     
    660660    {
    661661        // If physics is enabled scale the attached CollisionShape.
    662         /*if (this->hasPhysics() && this->collisionShape_ != NULL)
     662        /*if (this->hasPhysics() && this->collisionShape_ != nullptr)
    663663        {
    664664            this->collisionShape_->setScale3D(scale);
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc

    r10624 r10765  
    9494        for (unsigned int i=0; i < this->getAttachedObjects().size(); i++)
    9595        {
    96             if (this->getAttachedObject(i) == NULL)
     96            if (this->getAttachedObject(i) == nullptr)
    9797            {
    9898                break;
     
    151151                return it->second;
    152152        }
    153         return NULL;
     153        return nullptr;
    154154    }
    155155
     
    160160    void ModularSpaceShip::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
    161161    {
    162         if (cs != NULL && this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) != NULL)
     162        if (cs != nullptr && this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) != nullptr)
    163163            this->getPartOfEntity((StaticEntity*)(cs->getUserPointer()))->handleHit(damage, healthdamage, shielddamage, originator);
    164164        else
     
    212212    void ModularSpaceShip::addShipPart(ShipPart* part)
    213213    {
    214         OrxAssert(part != NULL, "The ShipPart cannot be NULL.");
     214        OrxAssert(part != nullptr, "The ShipPart cannot be nullptr.");
    215215        this->partList_.push_back(part);
    216216        part->setParent(this);
     
    222222        Get the i-th ShipPart of the SpaceShip.
    223223    @return
    224         Returns a pointer to the i-the ShipPart. NULL if there is no ShipPart with that index.
     224        Returns a pointer to the i-the ShipPart. nullptr if there is no ShipPart with that index.
    225225    */
    226226    ShipPart* ModularSpaceShip::getShipPart(unsigned int index)
    227227    {
    228228        if(this->partList_.size() <= index)
    229             return NULL;
     229            return nullptr;
    230230        else
    231231            return this->partList_[index];
     
    238238        The name of the ShipPart to be returned.
    239239    @return
    240         Pointer to the ShipPart with the given name, or NULL if not found.
     240        Pointer to the ShipPart with the given name, or nullptr if not found.
    241241    */
    242242    ShipPart* ModularSpaceShip::getShipPartByName(std::string name)
     
    250250        }
    251251        orxout(internal_warning) << "Couldn't find ShipPart with name \"" << name << "\"." << endl;
    252         return NULL;
     252        return nullptr;
    253253    }
    254254
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.h

    r10262 r10765  
    109109            ShipPart* getPartOfEntity(StaticEntity* entity) const;
    110110
    111             virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL, const btCollisionShape* cs = NULL);
     111            virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = nullptr, const btCollisionShape* cs = nullptr);
    112112
    113113            static void killShipPartStatic(std::string name);
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.h

    r10437 r10765  
    208208
    209209            //virtual void damage(float damage, Pawn* originator = 0);
    210             virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL, const btCollisionShape* cs = NULL);
     210            virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = nullptr, const btCollisionShape* cs = nullptr);
    211211
    212212            bool bAlive_;
     
    215215                { return new std::vector<PickupCarrier*>(); }
    216216            virtual PickupCarrier* getCarrierParent(void) const
    217                 { return NULL; }
     217                { return nullptr; }
    218218
    219219
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc

    r10216 r10765  
    4848    RegisterClass(SpaceShip);
    4949
    50     SpaceShip::SpaceShip(Context* context) : Pawn(context), boostBlur_(NULL)
     50    SpaceShip::SpaceShip(Context* context) : Pawn(context), boostBlur_(nullptr)
    5151    {
    5252        RegisterObject(SpaceShip);
     
    196196            if(this->bEnableMotionBlur_)
    197197            {
    198                 if (this->boostBlur_ == NULL && this->hasLocalController() && this->hasHumanController())
     198                if (this->boostBlur_ == nullptr && this->hasLocalController() && this->hasHumanController())
    199199                {
    200200                    this->boostBlur_ = new Shader(this->getScene()->getSceneManager());
     
    305305    void SpaceShip::addEngine(orxonox::Engine* engine)
    306306    {
    307         OrxAssert(engine != NULL, "The engine cannot be NULL.");
     307        OrxAssert(engine != nullptr, "The engine cannot be nullptr.");
    308308        this->engineList_.push_back(engine);
    309309        engine->addToSpaceShip(this);
     
    330330        Get the i-th Engine of the SpaceShip.
    331331    @return
    332         Returns a pointer to the i-the Engine. NULL if there is no Engine with that index.
     332        Returns a pointer to the i-the Engine. nullptr if there is no Engine with that index.
    333333    */
    334334    Engine* SpaceShip::getEngine(unsigned int i)
    335335    {
    336336        if(this->engineList_.size() >= i)
    337             return NULL;
     337            return nullptr;
    338338        else
    339339            return this->engineList_[i];
     
    346346        The name of the engine to be returned.
    347347    @return
    348         Pointer to the engine with the given name, or NULL if not found.
     348        Pointer to the engine with the given name, or nullptr if not found.
    349349    */
    350350    Engine* SpaceShip::getEngineByName(const std::string& name)
     
    355355
    356356        orxout(internal_warning) << "Couldn't find Engine with name \"" << name << "\"." << endl;
    357         return NULL;
     357        return nullptr;
    358358    }
    359359
     
    465465    void SpaceShip::changedEnableMotionBlur()
    466466    {
    467         if (!this->bEnableMotionBlur_ && this->boostBlur_ != NULL)
     467        if (!this->bEnableMotionBlur_ && this->boostBlur_ != nullptr)
    468468        {
    469469            delete this->boostBlur_;
    470             this->boostBlur_ = NULL;
     470            this->boostBlur_ = nullptr;
    471471        }
    472472    }
     
    510510    {
    511511        Camera* camera = CameraManager::getInstance().getActiveCamera();
    512         if(camera != NULL)
     512        if(camera != nullptr)
    513513        {
    514514            this->cameraOriginalPosition_ = camera->getPosition();
Note: See TracChangeset for help on using the changeset viewer.