Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 31, 2015, 6:11:53 PM (9 years ago)
Author:
landauf
Message:

merged branch cpp11 to cpp11_v2

Location:
code/branches/cpp11_v2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2

  • code/branches/cpp11_v2/src/orxonox/chat/ChatManager.cc

    r10624 r10733  
    107107
    108108        // notify all listeners
    109         for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it)
    110             it->incomingChat(text, name);
     109        for (ChatListener* listener : ObjectList<ChatListener>())
     110            listener->incomingChat(text, name);
    111111    }
    112112
  • code/branches/cpp11_v2/src/orxonox/controllers/ArtificialController.cc

    r10631 r10733  
    207207    void ArtificialController::setAllBotLevel(float level)
    208208    {
    209         for (ObjectList<ArtificialController>::iterator it = ObjectList<ArtificialController>::begin(); it != ObjectList<ArtificialController>::end(); ++it)
    210             it->setBotLevel(level);
     209        for (ArtificialController* controller : ObjectList<ArtificialController>())
     210            controller->setBotLevel(level);
    211211    }
    212212
     
    231231    int ArtificialController::getFiremode(std::string name)
    232232    {
    233         for (std::map< std::string, int >::iterator it = this->weaponModes_.begin(); it != this->weaponModes_.end(); ++it)
    234         {
    235             if (it->first == name)
    236                 return it->second;
     233        for (auto firemode : this->weaponModes_)
     234        {
     235            if (firemode.first == name)
     236                return firemode.second;
    237237        }
    238238        return -1;
     
    259259    {
    260260        WorldEntity* waypoint = NULL;
    261         for (ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it != ObjectList<WorldEntity>::end(); ++it)
    262         {
    263             if((*it)->getIdentifier() == ClassByString(name))
     261        for (WorldEntity* we : ObjectList<WorldEntity>())
     262        {
     263            if(we->getIdentifier() == ClassByString(name))
    264264            {
    265265                ControllableEntity* controllable = this->getControllableEntity();
    266266                if(!controllable) continue;
    267                 float actualDistance = ( (*it)->getPosition() - controllable->getPosition() ).length();
     267                float actualDistance = ( we->getPosition() - controllable->getPosition() ).length();
    268268                if(actualDistance > searchDistance || actualDistance < 5.0f) continue;
    269269                    // TODO: PickupSpawner: adjust waypoint accuracy to PickupSpawner's triggerdistance
     
    271271                else
    272272                {
    273                     waypoint = *it;
     273                    waypoint = we;
    274274                    break;
    275275                }
Note: See TracChangeset for help on using the changeset viewer.