Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

replace 'NULL' by 'nullptr'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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();
Note: See TracChangeset for help on using the changeset viewer.