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/orxonox/interfaces
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.cc

    r10624 r10765  
    127127    {
    128128        if(!this->isTarget(pickup))
    129             return NULL;
     129            return nullptr;
    130130
    131131        if(pickup->isTarget(this)) // If the PickupCarrier itself is a target.
    132132            return this;
    133133
    134         PickupCarrier* target = NULL;
     134        PickupCarrier* target = nullptr;
    135135        // Go recursively through all children to check whether they are the target.
    136136        std::vector<PickupCarrier*>* children = this->getCarrierChildren();
  • code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.h

    r9667 r10765  
    5959        But this structure has to be established first.
    6060        - <b>getCarrierChildren()</b> To this end a PickupCarrier needs to implement getCarrierChildren() which returns a list of its direct PickupCarrier children. If you need an example, have a look at @ref orxonox::Pawn "Pawn" and @ref orxonox::Engine "Engine".
    61         - <b>getCarrierParent()</b> This is the method in the other direction. It returns the parent of this PickupCarrier, or NULL if the PickupCarrier is a root node in this hierarchy.
     61        - <b>getCarrierParent()</b> This is the method in the other direction. It returns the parent of this PickupCarrier, or nullptr if the PickupCarrier is a root node in this hierarchy.
    6262
    6363    @author
  • code/branches/cpp11_v2/src/orxonox/interfaces/Pickupable.cc

    r10624 r10765  
    5656        RegisterObject(Pickupable);
    5757
    58         this->carrier_ = NULL;
     58        this->carrier_ = nullptr;
    5959
    6060        this->beingDestroyed_ = false;
     
    143143    bool Pickupable::isTarget(const PickupCarrier* carrier) const
    144144    {
    145         if(carrier == NULL)
     145        if(carrier == nullptr)
    146146            return false;
    147147
     
    210210    bool Pickupable::pickup(PickupCarrier* carrier)
    211211    {
    212         if(carrier == NULL || this->isPickedUp()) // If carrier is NULL or the Pickupable is already picked up.
     212        if(carrier == nullptr || this->isPickedUp()) // If carrier is nullptr or the Pickupable is already picked up.
    213213            return false;
    214214
     
    237237            return false;
    238238
    239         assert(this->getCarrier()); // The Carrier cannot be NULL at this point.
     239        assert(this->getCarrier()); // The Carrier cannot be nullptr at this point.
    240240        if(!this->getCarrier()->removePickup(this)) //TODO Shouldn't this be a little later?
    241241            orxout(internal_warning, context::pickups) << "Pickupable (&" << this << ", " << this->getIdentifier()->getName() << ") is being dropped, but it was not present in the PickupCarriers list of pickups." << endl;
     
    249249            created = this->createSpawner();
    250250
    251         this->setCarrier(NULL);
     251        this->setCarrier(nullptr);
    252252
    253253        if(!created && createSpawner) // If a PickupSpawner should have been created but wasn't.
     
    301301        orxout(verbose, context::pickups) << "Pickupable (&" << this << ") changed Carrier (& " << carrier << ")." << endl;
    302302
    303         if(carrier != NULL && tell)
     303        if(carrier != nullptr && tell)
    304304        {
    305305            if(!carrier->addPickup(this))
Note: See TracChangeset for help on using the changeset viewer.