Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2015, 11:22:03 PM (9 years ago)
Author:
landauf
Message:

use actual types instead of 'auto'. only exception is for complicated template types, e.g. when iterating over a map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc

    r10821 r10916  
    165165    {
    166166        unsigned int i = 0;
    167         for (const auto & elem : this->cameraPositions_)
     167        for (CameraPosition* cameraPosition : this->cameraPositions_)
    168168        {
    169169            if (i == index)
    170                 return (elem);
     170                return cameraPosition;
    171171            ++i;
    172172        }
     
    180180
    181181        unsigned int counter = 0;
    182         for (const auto & elem : this->cameraPositions_)
    183         {
    184             if ((elem) == this->currentCameraPosition_)
     182        for (CameraPosition* cameraPosition : this->cameraPositions_)
     183        {
     184            if (cameraPosition == this->currentCameraPosition_)
    185185                break;
    186186            counter++;
     
    477477        if (parent)
    478478        {
    479             for (auto & elem : this->cameraPositions_)
    480                 if ((elem)->getIsAbsolute())
    481                     parent->attach((elem));
     479            for (CameraPosition* cameraPosition : this->cameraPositions_)
     480                if (cameraPosition->getIsAbsolute())
     481                    parent->attach(cameraPosition);
    482482        }
    483483    }
Note: See TracChangeset for help on using the changeset viewer.