Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/tetris/TetrisScore.cc

    r10624 r11071  
    3636
    3737#include "core/CoreIncludes.h"
    38 #include "core/XMLPort.h"
    3938#include "util/Convert.h"
    4039
     
    5655        RegisterObject(TetrisScore);
    5756
    58         this->owner_ = 0;
    59         this->player_ = NULL;
     57        this->owner_ = nullptr;
     58        this->player_ = nullptr;
    6059    }
    6160
     
    6665    TetrisScore::~TetrisScore()
    6766    {
    68     }
    69 
    70     /**
    71     @brief
    72         Method to create a TetrisScore through XML.
    73     */
    74     void TetrisScore::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    75     {
    76         SUPER(TetrisScore, XMLPort, xmlelement, mode);
    7767    }
    7868
     
    8979
    9080        // If the owner is set. The owner being a Tetris game.
    91         if (this->owner_ != NULL)
     81        if (this->owner_ != nullptr)
    9282        {
    9383            std::string score("0");
     
    10191            {
    10292                // Save the name and score of each player as a string.
    103                 if (player_ != NULL)
     93                if (player_ != nullptr)
    10494                    score = multi_cast<std::string>(this->owner_->getScore(player_));
    10595            }
     
    111101    @brief
    112102        Is called when the owner changes.
    113         Sets the owner to NULL, if it is not a pointer to a Tetris game.
     103        Sets the owner to nullptr, if it is not a pointer to a Tetris game.
    114104    */
    115105    void TetrisScore::changedOwner()
     
    117107        SUPER(TetrisScore, changedOwner);
    118108
    119         if (this->getOwner() != NULL && this->getOwner()->getGametype())
     109        if (this->getOwner() != nullptr && this->getOwner()->getGametype())
    120110            this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype());
    121111        else
    122             this->owner_ = 0;
     112            this->owner_ = nullptr;
    123113    }
    124114}
Note: See TracChangeset for help on using the changeset viewer.