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/overlays/hud
Files:
2 edited

Legend:

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