Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 6, 2015, 10:54:34 PM (10 years ago)
Author:
landauf
Message:

replace '0' by 'nullptr'

Location:
code/branches/cpp11_v2/src/orxonox/worldentities
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/worldentities/BigExplosion.cc

    r9952 r10768  
    204204    void BigExplosion::initZero()
    205205    {
    206         this->debrisFire1_ = 0;
    207         this->debrisFire2_ = 0;
    208         this->debrisFire3_ = 0;
    209         this->debrisFire4_ = 0;
    210 
    211         this->debrisSmoke1_ = 0;
    212         this->debrisSmoke2_ = 0;
    213         this->debrisSmoke3_ = 0;
    214         this->debrisSmoke4_ = 0;
    215 
    216         this->explosionSmoke_=0;
    217         this->explosionFire_=0;
     206        this->debrisFire1_ = nullptr;
     207        this->debrisFire2_ = nullptr;
     208        this->debrisFire3_ = nullptr;
     209        this->debrisFire4_ = nullptr;
     210
     211        this->debrisSmoke1_ = nullptr;
     212        this->debrisSmoke2_ = nullptr;
     213        this->debrisSmoke3_ = nullptr;
     214        this->debrisSmoke4_ = nullptr;
     215
     216        this->explosionSmoke_=nullptr;
     217        this->explosionFire_=nullptr;
    218218    }
    219219
  • code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc

    r10765 r10768  
    6161        this->server_overwrite_ = 0;
    6262        this->client_overwrite_ = 0;
    63         this->player_ = 0;
     63        this->player_ = nullptr;
    6464        this->formerPlayer_ = nullptr;
    6565        this->playerID_ = OBJECTID_UNKNOWN;
    66         this->hud_ = 0;
    67         this->camera_ = 0;
    68         this->xmlcontroller_ = 0;
    69         //this->controller_ = 0;
    70         this->reverseCamera_ = 0;
     66        this->hud_ = nullptr;
     67        this->camera_ = nullptr;
     68        this->xmlcontroller_ = nullptr;
     69        //this->controller_ = nullptr;
     70        this->reverseCamera_ = nullptr;
    7171        this->bDestroyWhenPlayerLeft_ = false;
    7272        this->cameraPositionRootNode_ = this->node_->createChildSceneNode();
    73         this->currentCameraPosition_ = 0;
     73        this->currentCameraPosition_ = nullptr;
    7474        this->bMouseLook_ = false;
    7575        this->mouseLookSpeed_ = 200;
     
    171171            ++i;
    172172        }
    173         return 0;
     173        return nullptr;
    174174    }
    175175
     
    241241            {
    242242                this->camera_->attachToNode(this->cameraPositionRootNode_);
    243                 this->currentCameraPosition_ = 0;
     243                this->currentCameraPosition_ = nullptr;
    244244            }
    245245
     
    321321        if ( !GameMode::isMaster() )
    322322        {
    323             if ( target != 0 )
     323            if ( target != nullptr )
    324324            {
    325325                callMemberNetworkFunction(&ControllableEntity::setTargetInternal, this->getObjectID(), 0, target->getObjectID() );
     
    372372            this->stopLocalHumanControl();
    373373
    374         this->player_ = 0;
     374        this->player_ = nullptr;
    375375        this->playerID_ = OBJECTID_UNKNOWN;
    376376        this->bHasLocalController_ = false;
     
    411411            {
    412412                this->camera_->attachToNode(this->cameraPositionRootNode_);
    413                 this->currentCameraPosition_ = 0;
     413                this->currentCameraPosition_ = nullptr;
    414414            }
    415415        }
     
    447447            this->camera_->detachFromParent();
    448448            this->camera_->destroy();
    449             this->camera_ = 0;
     449            this->camera_ = nullptr;
    450450        }
    451451
     
    453453        {
    454454            this->hud_->destroy();
    455             this->hud_ = 0;
     455            this->hud_ = nullptr;
    456456        }
    457457    }
  • code/branches/cpp11_v2/src/orxonox/worldentities/Drone.cc

    r9667 r10768  
    4343        RegisterObject(Drone);
    4444
    45         this->myController_ = 0;
     45        this->myController_ = nullptr;
    4646
    4747        this->localLinearAcceleration_.setValue(0, 0, 0);
  • code/branches/cpp11_v2/src/orxonox/worldentities/ExplosionChunk.cc

    r9667 r10768  
    6262            {
    6363                orxout(internal_error) << "Couldn't load particle effect in ExplosionChunk: " << ex.what() << endl;
    64                 this->fire_ = 0;
    65                 this->smoke_ = 0;
     64                this->fire_ = nullptr;
     65                this->smoke_ = nullptr;
    6666            }
    6767        }
    6868        else
    6969        {
    70             this->fire_ = 0;
    71             this->smoke_ = 0;
     70            this->fire_ = nullptr;
     71            this->smoke_ = nullptr;
    7272        }
    7373
  • code/branches/cpp11_v2/src/orxonox/worldentities/MovableEntity.cc

    r10216 r10768  
    5050        this->overwrite_orientation_ = Quaternion::IDENTITY;
    5151
    52         this->continuousResynchroTimer_ = 0;
     52        this->continuousResynchroTimer_ = nullptr;
    5353
    5454        this->setPriority(Priority::Low);
     
    8080            {
    8181                float damage = this->collisionDamage_ * (victim->getVelocity() - this->getVelocity()).length();
    82                 victim->hit(0, contactPoint, ownCollisionShape, damage);
     82                victim->hit(nullptr, contactPoint, ownCollisionShape, damage);
    8383            }
    8484        }
  • code/branches/cpp11_v2/src/orxonox/worldentities/SpawnPoint.cc

    r9667 r10768  
    4343        RegisterObject(SpawnPoint);
    4444
    45         this->template_ = 0;
     45        this->template_ = nullptr;
    4646
    4747        if (this->getGametype())
  • code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc

    r10765 r10768  
    7777        this->node_ = this->getScene()->getRootSceneNode()->createChildSceneNode();
    7878
    79         this->parent_ = 0;
     79        this->parent_ = nullptr;
    8080        this->parentID_ = OBJECTID_UNKNOWN;
    8181        this->bDeleteWithParent_ = true;
     
    9090
    9191        // Default behaviour does not include physics
    92         this->physicalBody_   = 0;
     92        this->physicalBody_   = nullptr;
    9393        this->bPhysicsActive_ = false;
    9494        this->bPhysicsActiveSynchronised_    = false;
     
    498498    void WorldEntity::notifyDetached()
    499499    {
    500         this->parent_ = 0;
     500        this->parent_ = nullptr;
    501501        this->parentID_ = OBJECTID_UNKNOWN;
    502502
     
    525525            ++i;
    526526        }
    527         return 0;
     527        return nullptr;
    528528    }
    529529
     
    856856            deactivatePhysics();
    857857            delete this->physicalBody_;
    858             this->physicalBody_ = 0;
     858            this->physicalBody_ = nullptr;
    859859            this->collisionType_ = None;
    860860            this->collisionTypeSynchronised_ = None;
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc

    r10765 r10768  
    5353    RegisterClass(ModularSpaceShip);
    5454
    55     std::map<StaticEntity*, ShipPart*>* ModularSpaceShip::partMap_s = 0;
     55    std::map<StaticEntity*, ShipPart*>* ModularSpaceShip::partMap_s = nullptr;
    5656
    5757    ModularSpaceShip::ModularSpaceShip(Context* context) : SpaceShip(context)
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.cc

    r10650 r10768  
    7676        this->reloadWaitCountdown_ = 0;
    7777
    78         this->lastHitOriginator_ = 0;
     78        this->lastHitOriginator_ = nullptr;
    7979
    8080        // set damage multiplier to default value 1, meaning nominal damage
     
    9191        }
    9292        else
    93             this->weaponSystem_ = 0;
     93            this->weaponSystem_ = nullptr;
    9494
    9595        this->setRadarObjectColour(ColourValue::Red);
     
    109109        else
    110110        {
    111             this->explosionSound_ = 0;
     111            this->explosionSound_ = nullptr;
    112112        }
    113113    }
     
    345345                    {
    346346                        // delete the AIController // <-- TODO: delete? nothing is deleted here... should we delete the controller?
    347                         slave->setControllableEntity(0);
     347                        slave->setControllableEntity(nullptr);
    348348
    349349                        // set a new master within the formation
     
    509509            return this->weaponSystem_->getWeaponSlot(index);
    510510        else
    511             return 0;
     511            return nullptr;
    512512    }
    513513
     
    523523            return this->weaponSystem_->getWeaponSet(index);
    524524        else
    525             return 0;
     525            return nullptr;
    526526    }
    527527
     
    551551            return this->weaponSystem_->getWeaponPack(index);
    552552        else
    553             return 0;
     553            return nullptr;
    554554    }
    555555
     
    594594                return it->getController();
    595595        }
    596         return 0;
     596        return nullptr;
    597597    }
    598598
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.h

    r10765 r10768  
    207207            virtual void spawneffect();
    208208
    209             //virtual void damage(float damage, Pawn* originator = 0);
     209            //virtual void damage(float damage, Pawn* originator = nullptr);
    210210            virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = nullptr, const btCollisionShape* cs = nullptr);
    211211
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc

    r10765 r10768  
    494494            Camera* camera = this->getCamera();
    495495            //Shaking Camera effect
    496             if (camera != 0)
     496            if (camera != nullptr)
    497497                camera->setOrientation(Vector3::UNIT_X, angle);
    498498
     
    526526        {
    527527            Camera *camera = this->getCamera();
    528             if (camera == 0)
     528            if (camera == nullptr)
    529529            {
    530530                orxout(internal_warning) << "Failed to reset camera!" << endl;
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Spectator.cc

    r10624 r10768  
    5858        this->localVelocity_ = Vector3::ZERO;
    5959        this->setHudTemplate("spectatorhud");
    60         this->greetingFlare_ = 0;
     60        this->greetingFlare_ = nullptr;
    6161
    6262        this->setDestroyWhenPlayerLeft(true);
Note: See TracChangeset for help on using the changeset viewer.