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/pong/PongBall.cc

    r9945 r11071  
    6161        this->speed_ = 0;
    6262        this->accelerationFactor_ = 1.0f;
    63         this->bat_ = 0;
     63        this->bat_ = nullptr;
    6464        this->bDeleteBats_ = false;
    6565        this->batID_ = new unsigned int[2];
     
    8282             else
    8383             {
    84                  this->defScoreSound_ = 0;
    85                  this->defBatSound_ = 0;
    86                  this->defBoundarySound_ = 0;
     84                 this->defScoreSound_ = nullptr;
     85                 this->defBatSound_ = nullptr;
     86                 this->defBoundarySound_ = nullptr;
    8787             }
    8888    }
     
    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];
Note: See TracChangeset for help on using the changeset viewer.