Changeset 6533 for code/trunk/src/orxonox
- Timestamp:
- Mar 16, 2010, 10:49:35 AM (15 years ago)
- Location:
- code/trunk/src/orxonox/interfaces
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc
r6524 r6533 64 64 PickupCarrier::~PickupCarrier() 65 65 { 66 for(std::set<Pickupable*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)66 while(this->pickups_.size() > 0) 67 67 { 68 std::set<Pickupable*>::iterator it = this->pickups_.begin(); 69 this->pickups_.erase(it); 68 70 (*it)->destroy(); 69 71 } 70 72 71 73 this->pickups_.clear(); 72 74 } -
code/trunk/src/orxonox/interfaces/PickupCarrier.h
r6524 r6533 41 41 #include "Pickupable.h" 42 42 #include "core/Identifier.h" 43 #include "core/WeakPtr.h" 43 44 44 45 #include "core/OrxonoxClass.h" -
code/trunk/src/orxonox/interfaces/Pickupable.h
r6524 r6533 114 114 { return this->pickupIdentifier_; } 115 115 116 virtual void destroy(void)117 { delete this; }118 119 116 //TODO: Make them work as protected. 120 117 bool setUsed(bool used); //!< Sets the Pickupable to used or unused, depending on the input.
Note: See TracChangeset
for help on using the changeset viewer.