Changeset 10821 for code/branches/cpp11_v2/src/orxonox/Level.cc
- Timestamp:
- Nov 21, 2015, 7:05:53 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/Level.cc
r10818 r10821 106 106 void Level::networkCallbackTemplatesChanged() 107 107 { 108 for( std::set<std::string>::iterator it = this->networkTemplateNames_.begin(); it!=this->networkTemplateNames_.end(); ++it)109 { 110 assert(Template::getTemplate( *it));111 Template::getTemplate( *it)->applyOn(this);108 for(const auto & elem : this->networkTemplateNames_) 109 { 110 assert(Template::getTemplate(elem)); 111 Template::getTemplate(elem)->applyOn(this); 112 112 } 113 113 } … … 135 135 // objects alive when ~Level is called. This is the reason why we cannot directly destroy() the Plugins - instead we need 136 136 // to call destroyLater() to ensure that no instances from this plugin exist anymore. 137 for ( std::list<PluginReference*>::iterator it = this->plugins_.begin(); it != this->plugins_.end(); ++it)138 ( *it)->destroyLater();137 for (auto & elem : this->plugins_) 138 (elem)->destroyLater(); 139 139 this->plugins_.clear(); 140 140 } … … 173 173 { 174 174 unsigned int i = 0; 175 for ( std::list<BaseObject*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)175 for (const auto & elem : this->objects_) 176 176 { 177 177 if (i == index) 178 return ( *it);178 return (elem); 179 179 ++i; 180 180 }
Note: See TracChangeset
for help on using the changeset viewer.