Changeset 6078 for code/branches/particles2/src/orxonox/weaponsystem
- Timestamp:
- Nov 17, 2009, 1:36:21 AM (15 years ago)
- Location:
- code/branches/particles2/src/orxonox/weaponsystem
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/particles2/src/orxonox/weaponsystem/WeaponPack.cc
r6076 r6078 96 96 return; 97 97 98 assert( std::find(this->weapons_.begin(), this->weapons_.end(), weapon)!=this->weapons_.end() ); 99 this->weapons_.erase( std::find(this->weapons_.begin(), this->weapons_.end(), weapon) ); 98 std::vector<Weapon*>::iterator it = std::find(this->weapons_.begin(), this->weapons_.end(), weapon); 99 assert(it != this->weapons_.end()); 100 this->weapons_.erase(it); 100 101 weapon->setWeaponPack(0); 101 102 } -
code/branches/particles2/src/orxonox/weaponsystem/WeaponSystem.cc
r6076 r6078 221 221 222 222 // Remove the WeaponPack from the WeaponSystem 223 assert( std::find(this->weaponPacks_.begin(),this->weaponPacks_.end(),wPack)!=this->weaponPacks_.end() ); 224 this->weaponPacks_.erase( std::find(this->weaponPacks_.begin(),this->weaponPacks_.end(),wPack) ); 223 std::vector<WeaponPack*>::iterator it = std::find(this->weaponPacks_.begin(),this->weaponPacks_.end(), wPack); 224 assert(it !=this->weaponPacks_.end()); 225 this->weaponPacks_.erase(it); 225 226 } 226 227
Note: See TracChangeset
for help on using the changeset viewer.