- Timestamp:
- Aug 8, 2010, 8:53:52 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/orxonox/interfaces/InterfaceCompilation.cc
r7127 r7162 59 59 { 60 60 RegisterRootObject(PickupCarrier); 61 62 this->setCarrierName("PickupCarrier");63 61 } 64 62 65 63 PickupCarrier::~PickupCarrier() 66 64 { 65 66 } 67 68 void PickupCarrier::preDestroy(void) 69 { 67 70 std::set<Pickupable*>::iterator it = this->pickups_.begin(); 71 std::set<Pickupable*>::iterator temp; 68 72 while(it != this->pickups_.end()) 69 73 { 70 (*it)->destroy(); 74 (*it)->carrierDestroyed(); 75 temp = it; 71 76 it = this->pickups_.begin(); 77 if(it == temp) // Infinite loop avoidance, in case the pickup wasn't removed from the carrier somewhere in the carrierDestroy() procedure. 78 { 79 COUT(2) << "Oops. In a PickupCarrier, while cleaning up, a Pickupable (&" << (*temp) << ") didn't unregister itself as it should have." << std::endl;; 80 it++; 81 } 72 82 } 73 83
Note: See TracChangeset
for help on using the changeset viewer.