Changeset 8297 for code/trunk/src/orxonox/interfaces
- Timestamp:
- Apr 22, 2011, 5:59:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/interfaces/PickupCarrier.cc
r7547 r8297 66 66 { 67 67 std::set<Pickupable*>::iterator it = this->pickups_.begin(); 68 std::set<Pickupable*>::iterator temp; 68 Pickupable* temp; 69 // Iterate over all pickups that are attached to this PickupCarrier and destroy them. 69 70 while(it != this->pickups_.end()) 70 71 { 72 temp = *it; 71 73 (*it)->carrierDestroyed(); 72 temp = it;73 74 it = this->pickups_.begin(); 74 if( it == temp) // Infinite loop avoidance, in case the pickup wasn't removed from the carrier somewhere in the carrierDestroy() procedure.75 if(temp == *it) // Infinite loop avoidance, in case the pickup wasn't removed from the carrier somewhere in the carrierDestroy() procedure. 75 76 { 76 COUT(2) << "Oops. In a PickupCarrier, while cleaning up, a Pickupable (&" << (*temp)<< ") didn't unregister itself as it should have." << std::endl;;77 COUT(2) << "Oops. In a PickupCarrier, while cleaning up, a Pickupable (&" << temp << ") didn't unregister itself as it should have." << std::endl;; 77 78 it++; 78 79 }
Note: See TracChangeset
for help on using the changeset viewer.