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/invader
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/modules/invader/Invader.cc

    r10733 r10765  
    7878    {
    7979        level++;
    80         if (getPlayer() != NULL)
     80        if (getPlayer() != nullptr)
    8181        {
    8282            for (int i = 0; i < 7; i++)
     
    9696    InvaderShip* Invader::getPlayer()
    9797    {
    98         if (player == NULL)
     98        if (player == nullptr)
    9999        {
    100100            for (ObjectList<InvaderShip>::iterator it = ObjectList<InvaderShip>::begin(); it != ObjectList<InvaderShip>::end(); ++it)
     
    106106    void Invader::spawnEnemy()
    107107    {
    108         if (getPlayer() == NULL)
     108        if (getPlayer() == nullptr)
    109109            return;
    110110
     
    158158        this->bForceSpawn_ = true;
    159159
    160         if (this->center_ == NULL)  // abandon mission!
     160        if (this->center_ == nullptr)  // abandon mission!
    161161        {
    162162            orxout(internal_error) << "Invader: No Centerpoint specified." << endl;
  • code/branches/cpp11_v2/src/modules/invader/InvaderCenterPoint.cc

    r10624 r10765  
    5656    void InvaderCenterPoint::checkGametype()
    5757    {
    58         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Invader)))
     58        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Invader)))
    5959        {
    6060            Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype());
  • code/branches/cpp11_v2/src/modules/invader/InvaderEnemy.cc

    r10733 r10765  
    5656            removeHealth(2000);
    5757
    58         if (player != NULL)
     58        if (player != nullptr)
    5959        {
    6060            float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * (player->getPosition().z - getPosition().z);
     
    7373    Invader* InvaderEnemy::getGame()
    7474    {
    75         if (game == NULL)
     75        if (game == nullptr)
    7676        {
    7777            for (ObjectList<Invader>::iterator it = ObjectList<Invader>::begin(); it != ObjectList<Invader>::end(); ++it)
     
    8484    {
    8585        Pawn::damage(damage, healthdamage, shielddamage, originator, cs);
    86         if (getGame() && orxonox_cast<InvaderShip*>(originator) != NULL && getHealth() <= 0)
     86        if (getGame() && orxonox_cast<InvaderShip*>(originator) != nullptr && getHealth() <= 0)
    8787            getGame()->addPoints(42);
    8888    }
  • code/branches/cpp11_v2/src/modules/invader/InvaderEnemyShooter.cc

    r10733 r10765  
    5959            removeHealth(2000);
    6060
    61         if (player != NULL)
     61        if (player != nullptr)
    6262        {
    6363            float distPlayer = player->getPosition().z - getPosition().z;
     
    7777    {
    7878        Pawn::damage(damage, healthdamage, shielddamage, originator, cs);
    79         if (getGame() && orxonox_cast<InvaderShip*>(originator) != NULL && getHealth() <= 0)
     79        if (getGame() && orxonox_cast<InvaderShip*>(originator) != nullptr && getHealth() <= 0)
    8080            getGame()->addPoints(3*42);
    8181    }
  • code/branches/cpp11_v2/src/modules/invader/InvaderShip.cc

    r10733 r10765  
    9595        // Camera
    9696        Camera* camera = this->getCamera();
    97         if (camera != NULL)
     97        if (camera != nullptr)
    9898        {
    9999            camera->setPosition(Vector3(-pos.z, -posforeward, 0));
     
    154154        Projectile* shot = orxonox_cast<Projectile*>(otherObject);
    155155        // ensure that this gets only called once per enemy.
    156         if (enemy != NULL && lastEnemy != enemy)
     156        if (enemy != nullptr && lastEnemy != enemy)
    157157        {
    158158            lastEnemy = enemy;
     
    165165        }
    166166        // was shot, decrease multiplier
    167         else if (shot != NULL  && lastShot != shot)
     167        else if (shot != nullptr  && lastShot != shot)
    168168        {
    169             if (getGame() && orxonox_cast<InvaderEnemy*>(shot->getShooter()) != NULL)
     169            if (getGame() && orxonox_cast<InvaderEnemy*>(shot->getShooter()) != nullptr)
    170170            {
    171171                if (getGame()->multiplier > 1)
     
    182182    Invader* InvaderShip::getGame()
    183183    {
    184         if (game == NULL)
     184        if (game == nullptr)
    185185        {
    186186            for (ObjectList<Invader>::iterator it = ObjectList<Invader>::begin(); it != ObjectList<Invader>::end(); ++it)
Note: See TracChangeset for help on using the changeset viewer.