Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2016, 1:54:11 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v2 into cpp11_v3

Location:
code/branches/cpp11_v3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v3

  • code/branches/cpp11_v3/src/orxonox/Level.cc

    r10624 r11054  
    3030
    3131#include "util/Math.h"
     32#include "util/SubString.h"
    3233#include "core/CoreIncludes.h"
    3334#include "core/Loader.h"
     
    5455        this->registerVariables();
    5556        this->xmlfilename_ = this->getFilename();
    56         this->xmlfile_ = 0;
     57        this->xmlfile_ = nullptr;
    5758    }
    5859
     
    105106    void Level::networkCallbackTemplatesChanged()
    106107    {
    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);
    111112        }
    112113    }
     
    134135        //       objects alive when ~Level is called. This is the reason why we cannot directly destroy() the Plugins - instead we need
    135136        //       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();
    138139        this->plugins_.clear();
    139140    }
     
    172173    {
    173174        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_)
    175176        {
    176177            if (i == index)
    177                 return (*it);
     178                return object;
    178179            ++i;
    179180        }
    180         return 0;
     181        return nullptr;
    181182    }
    182183
     
    195196            return this->lodInformation_.find(meshName)->second;
    196197
    197         return 0;
     198        return nullptr;
    198199    }
    199200
     
    207208    {
    208209        orxout(internal_info) << "player left level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << endl;
    209         player->switchGametype(0);
     210        player->switchGametype(nullptr);
    210211    }
    211212}
Note: See TracChangeset for help on using the changeset viewer.