Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/Core.cc

    r11011 r11071  
    8383{
    8484    //! Static pointer to the singleton
    85     Core* Core::singletonPtr_s  = 0;
     85    Core* Core::singletonPtr_s  = nullptr;
    8686
    8787    SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file");
     
    9898
    9999    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)
    115115        , 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)
    120120        , destructionHelper_(this)
    121121    {
     
    179179
    180180        // initialize root context
    181         Context::setRootContext(new Context(NULL));
     181        Context::setRootContext(new Context(nullptr));
    182182
    183183        // Do this soon after the ConfigFileManager has been created to open up the
     
    282282
    283283        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);
    287287            this->loadModule(module);
    288288            this->modules_.push_back(module);
     
    312312    void Core::unloadModules()
    313313    {
    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        {
    317316            this->unloadModule(module);
    318317            delete module;
     
    329328        module->deleteAllStaticallyInitializedInstances();
    330329        this->dynLibManager_->unload(module->getDynLib());
    331         module->setDynLib(NULL);
     330        module->setDynLib(nullptr);
    332331    }
    333332
     
    464463    {
    465464        // 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);
    468467        if (this->bGraphicsLoaded_)
    469468        {
     
    474473        }
    475474        // Process console events and status line
    476         if (this->ioConsole_ != NULL)
     475        if (this->ioConsole_ != nullptr)
    477476            this->ioConsole_->preUpdate(time);
    478477        // Process thread commands
     
    483482    {
    484483        // 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);
    487486        if (this->bGraphicsLoaded_)
    488487        {
Note: See TracChangeset for help on using the changeset viewer.