- Timestamp:
- Nov 21, 2015, 7:05:53 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc
r10769 r10821 165 165 { 166 166 unsigned int i = 0; 167 for ( std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)167 for (const auto & elem : this->cameraPositions_) 168 168 { 169 169 if (i == index) 170 return ( *it);170 return (elem); 171 171 ++i; 172 172 } … … 180 180 181 181 unsigned int counter = 0; 182 for ( std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)183 { 184 if (( *it) == this->currentCameraPosition_)182 for (const auto & elem : this->cameraPositions_) 183 { 184 if ((elem) == this->currentCameraPosition_) 185 185 break; 186 186 counter++; … … 477 477 if (parent) 478 478 { 479 for ( std::list<StrongPtr<CameraPosition>>::iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)480 if (( *it)->getIsAbsolute())481 parent->attach(( *it));479 for (auto & elem : this->cameraPositions_) 480 if ((elem)->getIsAbsolute()) 481 parent->attach((elem)); 482 482 } 483 483 }
Note: See TracChangeset
for help on using the changeset viewer.