- Timestamp:
- Jan 10, 2016, 1:54:11 PM (8 years ago)
- Location:
- code/branches/cpp11_v3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v3
- Property svn:mergeinfo changed
-
code/branches/cpp11_v3/src/orxonox/worldentities/EffectContainer.cc
r9667 r11054 44 44 EffectContainer::EffectContainer(Context* context) 45 45 : BaseObject(context) 46 , lua_( NULL)46 , lua_(nullptr) 47 47 { 48 48 RegisterObject(EffectContainer); … … 89 89 { 90 90 unsigned int i = 0; 91 for ( std::vector<WorldEntity*>::const_iterator it = this->effects_.begin(); it != this->effects_.end(); ++it)91 for (WorldEntity* effect : this->effects_) 92 92 if (i == index) 93 return (*it);94 return NULL;93 return effect; 94 return nullptr; 95 95 } 96 96 … … 103 103 bool result = (bool)lua_toboolean(this->lua_->getInternalLuaState(), -1); 104 104 lua_pop(this->lua_->getInternalLuaState(), 1); 105 for ( std::vector<WorldEntity*>::const_iterator it = this->effects_.begin(); it != this->effects_.end(); ++it)105 for (WorldEntity* effect : this->effects_) 106 106 { 107 (*it)->setMainState(result);107 effect->setMainState(result); 108 108 } 109 109 }
Note: See TracChangeset
for help on using the changeset viewer.