Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 11, 2012, 10:57:40 PM (12 years ago)
Author:
dafrick
Message:

Should fix internal warnig (and compile error introduced in last commit)

Location:
code/branches/presentation2012merge/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/src/modules/pickup/PickupCollection.cc

    r9292 r9293  
    7575        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
    7676        {
     77            if((*it)->isBeingDestroyed())
     78                continue;
     79
    7780            (*it)->wasRemovedFromCollection();
    7881            (*it)->destroyPickup();
     
    276279            return NULL;
    277280
    278         std::list<CollectiblePickup*>::iterator it = this->pickups_.begin();
     281        std::list<CollectiblePickup*>::const_iterator it = this->pickups_.begin();
    279282        std::advance(it, index);
    280283        return *it;
  • code/branches/presentation2012merge/src/orxonox/interfaces/Pickupable.cc

    r9279 r9293  
    104104    void Pickupable::destroyPickup(void)
    105105    {
    106         if(!this->beingDestroyed_)
     106        if(!this->isBeingDestroyed())
    107107            this->OrxonoxClass::destroy();
    108108        else
  • code/branches/presentation2012merge/src/orxonox/interfaces/Pickupable.h

    r8866 r9293  
    172172            inline void setDisabled(void)
    173173                { this->enabled_ = false; }
     174
     175            /**
     176            @brief Check whether the Pickupable is in the process of being destroyed.
     177            @return Returns true if so.
     178            */
     179            inline bool isBeingDestroyed(void)
     180                { return this->beingDestroyed_; }
    174181
    175182            /**
Note: See TracChangeset for help on using the changeset viewer.