Changeset 10919 for code/branches/cpp11_v2/src/orxonox/items
- Timestamp:
- Dec 5, 2015, 10:47:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc
r10916 r10919 85 85 { 86 86 // We have no ship, so the effects are not attached and won't be destroyed automatically 87 for ( std::vector<EffectContainer*>::const_iterator it = this->effectContainers_.begin(); it != this->effectContainers_.end(); ++it)88 for (std::vector<WorldEntity*>::const_iterator it 2 = (*it)->getEffectsBegin(); it2 != (*it)->getEffectsBegin(); ++it2)89 (*it 2)->destroy();87 for (EffectContainer* container : this->effectContainers_) 88 for (std::vector<WorldEntity*>::const_iterator it = container->getEffectsBegin(); it != container->getEffectsBegin(); ++it) 89 (*it)->destroy(); 90 90 if (this->defEngineSndNormal_) 91 91 this->defEngineSndNormal_->destroy(); … … 178 178 179 179 // Update all effect conditions 180 for ( std::vector<EffectContainer*>::const_iterator it = this->effectContainers_.begin(); it != this->effectContainers_.end(); ++it)181 (*it)->updateCondition();180 for (EffectContainer* container : this->effectContainers_) 181 container->updateCondition(); 182 182 } 183 183 } … … 198 198 this->getShip()->attach(defEngineSndBoost_); 199 199 200 for ( std::vector<EffectContainer*>::const_iterator it = this->effectContainers_.begin(); it != this->effectContainers_.end(); ++it)201 for (std::vector<WorldEntity*>::const_iterator it 2 = (*it)->getEffectsBegin(); it2 != (*it)->getEffectsEnd(); ++it2)202 this->getShip()->attach(*it 2);200 for (EffectContainer* container : this->effectContainers_) 201 for (std::vector<WorldEntity*>::const_iterator it = container->getEffectsBegin(); it != container->getEffectsEnd(); ++it) 202 this->getShip()->attach(*it); 203 203 } 204 204
Note: See TracChangeset
for help on using the changeset viewer.