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/orxonox/interfaces/Pickupable.cc

    r10624 r11071  
    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
     
    160160    {
    161161        // Iterate through all targets of this Pickupable.
    162         for(std::list<Identifier*>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++)
     162        for(Identifier* target : this->targets_)
    163163        {
    164             if(identifier->isA(*it))
     164            if(identifier->isA(target))
    165165                return true;
    166166        }
     
    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.