Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 27, 2008, 11:44:20 AM (16 years ago)
Author:
rgrieder
Message:
  • Updated msvc files
  • Changed iterator to const_iterator for stl iterator in constant member functions (msvc reports a build error otherwise)
  • Added linkage again to BLANKSTRING: The whole idea about it was to give "" an address in the memory so we can return that address. static const variables however don't have a linkage and therefore no address, so it's equivalent to writing "". Fortunately, at least msvc (gcc too I guess) is clever enough to artificially create a real symbol, so it did work without the linkage.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.cc

    r2019 r2020  
    143143            unsigned int randomspawn = (unsigned int)rnd(this->spawnpoints_.size());
    144144            unsigned int index = 0;
    145             for (std::set<SpawnPoint*>::iterator it = this->spawnpoints_.begin(); it != this->spawnpoints_.end(); ++it)
     145            for (std::set<SpawnPoint*>::const_iterator it = this->spawnpoints_.begin(); it != this->spawnpoints_.end(); ++it)
    146146            {
    147147                if (index == randomspawn)
     
    156156    void Gametype::assignDefaultPawnsIfNeeded() const
    157157    {
    158         for (std::set<PlayerInfo*>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
     158        for (std::set<PlayerInfo*>::const_iterator it = this->players_.begin(); it != this->players_.end(); ++it)
    159159        {
    160160            if (!(*it)->getControllableEntity() && (!(*it)->isReadyToSpawn() || !this->bStarted_))
Note: See TracChangeset for help on using the changeset viewer.