Changeset 11054 for code/branches/cpp11_v3/src/orxonox/Level.cc
- Timestamp:
- Jan 10, 2016, 1:54:11 PM (9 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/Level.cc
r10624 r11054 30 30 31 31 #include "util/Math.h" 32 #include "util/SubString.h" 32 33 #include "core/CoreIncludes.h" 33 34 #include "core/Loader.h" … … 54 55 this->registerVariables(); 55 56 this->xmlfilename_ = this->getFilename(); 56 this->xmlfile_ = 0;57 this->xmlfile_ = nullptr; 57 58 } 58 59 … … 105 106 void Level::networkCallbackTemplatesChanged() 106 107 { 107 for( std::set<std::string>::iterator it = this->networkTemplateNames_.begin(); it!=this->networkTemplateNames_.end(); ++it)108 { 109 assert(Template::getTemplate( *it));110 Template::getTemplate( *it)->applyOn(this);108 for(const std::string& name : this->networkTemplateNames_) 109 { 110 assert(Template::getTemplate(name)); 111 Template::getTemplate(name)->applyOn(this); 111 112 } 112 113 } … … 134 135 // objects alive when ~Level is called. This is the reason why we cannot directly destroy() the Plugins - instead we need 135 136 // to call destroyLater() to ensure that no instances from this plugin exist anymore. 136 for ( std::list<PluginReference*>::iterator it = this->plugins_.begin(); it != this->plugins_.end(); ++it)137 (*it)->destroyLater();137 for (PluginReference* plugin : this->plugins_) 138 plugin->destroyLater(); 138 139 this->plugins_.clear(); 139 140 } … … 172 173 { 173 174 unsigned int i = 0; 174 for ( std::list<BaseObject*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)175 for (BaseObject* object : this->objects_) 175 176 { 176 177 if (i == index) 177 return (*it);178 return object; 178 179 ++i; 179 180 } 180 return 0;181 return nullptr; 181 182 } 182 183 … … 195 196 return this->lodInformation_.find(meshName)->second; 196 197 197 return 0;198 return nullptr; 198 199 } 199 200 … … 207 208 { 208 209 orxout(internal_info) << "player left level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << endl; 209 player->switchGametype( 0);210 player->switchGametype(nullptr); 210 211 } 211 212 }
Note: See TracChangeset
for help on using the changeset viewer.