Changeset 11054 for code/branches/cpp11_v3/src/libraries/core/Core.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/libraries/core/Core.cc
r11011 r11054 83 83 { 84 84 //! Static pointer to the singleton 85 Core* Core::singletonPtr_s = 0;85 Core* Core::singletonPtr_s = nullptr; 86 86 87 87 SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file"); … … 98 98 99 99 Core::Core(const std::string& cmdLine) 100 : applicationPaths_( NULL)101 , configurablePaths_( NULL)102 , dynLibManager_( NULL)103 , signalHandler_( NULL)104 , configFileManager_( NULL)105 , languageInstance_( NULL)106 , loaderInstance_( NULL)107 , ioConsole_( NULL)108 , tclBind_( NULL)109 , tclThreadManager_( NULL)110 , rootScope_( NULL)111 , graphicsManager_( NULL)112 , inputManager_( NULL)113 , guiManager_( NULL)114 , graphicsScope_( NULL)100 : applicationPaths_(nullptr) 101 , configurablePaths_(nullptr) 102 , dynLibManager_(nullptr) 103 , signalHandler_(nullptr) 104 , configFileManager_(nullptr) 105 , languageInstance_(nullptr) 106 , loaderInstance_(nullptr) 107 , ioConsole_(nullptr) 108 , tclBind_(nullptr) 109 , tclThreadManager_(nullptr) 110 , rootScope_(nullptr) 111 , graphicsManager_(nullptr) 112 , inputManager_(nullptr) 113 , guiManager_(nullptr) 114 , graphicsScope_(nullptr) 115 115 , bGraphicsLoaded_(false) 116 , staticInitHandler_( NULL)117 , pluginManager_( NULL)118 , rootModule_( NULL)119 , config_( NULL)116 , staticInitHandler_(nullptr) 117 , pluginManager_(nullptr) 118 , rootModule_(nullptr) 119 , config_(nullptr) 120 120 , destructionHelper_(this) 121 121 { … … 179 179 180 180 // initialize root context 181 Context::setRootContext(new Context( NULL));181 Context::setRootContext(new Context(nullptr)); 182 182 183 183 // Do this soon after the ConfigFileManager has been created to open up the … … 282 282 283 283 const std::vector<std::string>& modulePaths = ApplicationPaths::getInstance().getModulePaths(); 284 for ( std::vector<std::string>::const_iterator it = modulePaths.begin(); it != modulePaths.end(); ++it)285 { 286 ModuleInstance* module = new ModuleInstance( *it);284 for (const std::string& modulePath : modulePaths) 285 { 286 ModuleInstance* module = new ModuleInstance(modulePath); 287 287 this->loadModule(module); 288 288 this->modules_.push_back(module); … … 312 312 void Core::unloadModules() 313 313 { 314 for (std::list<ModuleInstance*>::iterator it = this->modules_.begin(); it != this->modules_.end(); ++it) 315 { 316 ModuleInstance* module = (*it); 314 for (ModuleInstance* module : this->modules_) 315 { 317 316 this->unloadModule(module); 318 317 delete module; … … 329 328 module->deleteAllStaticallyInitializedInstances(); 330 329 this->dynLibManager_->unload(module->getDynLib()); 331 module->setDynLib( NULL);330 module->setDynLib(nullptr); 332 331 } 333 332 … … 464 463 { 465 464 // Update UpdateListeners before general ticking 466 for ( ObjectList<UpdateListener>::iterator it = ObjectList<UpdateListener>::begin(); it != ObjectList<UpdateListener>::end(); ++it)467 it->preUpdate(time);465 for (UpdateListener* listener : ObjectList<UpdateListener>()) 466 listener->preUpdate(time); 468 467 if (this->bGraphicsLoaded_) 469 468 { … … 474 473 } 475 474 // Process console events and status line 476 if (this->ioConsole_ != NULL)475 if (this->ioConsole_ != nullptr) 477 476 this->ioConsole_->preUpdate(time); 478 477 // Process thread commands … … 483 482 { 484 483 // Update UpdateListeners just before rendering 485 for ( ObjectList<UpdateListener>::iterator it = ObjectList<UpdateListener>::begin(); it != ObjectList<UpdateListener>::end(); ++it)486 it->postUpdate(time);484 for (UpdateListener* listener : ObjectList<UpdateListener>()) 485 listener->postUpdate(time); 487 486 if (this->bGraphicsLoaded_) 488 487 {
Note: See TracChangeset
for help on using the changeset viewer.