- Timestamp:
- Nov 21, 2015, 7:05:53 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc
r10769 r10821 62 62 OverlayGroup::~OverlayGroup() 63 63 { 64 for ( std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)65 ( *it)->destroy();64 for (const auto & elem : hudElements_) 65 (elem)->destroy(); 66 66 this->hudElements_.clear(); 67 67 } … … 86 86 void OverlayGroup::setScale(const Vector2& scale) 87 87 { 88 for ( std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)89 ( *it)->scale(scale / this->scale_);88 for (const auto & elem : hudElements_) 89 (elem)->scale(scale / this->scale_); 90 90 this->scale_ = scale; 91 91 } … … 94 94 void OverlayGroup::setScroll(const Vector2& scroll) 95 95 { 96 for ( std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)97 ( *it)->scroll(scroll - this->scroll_);96 for (const auto & elem : hudElements_) 97 (elem)->scroll(scroll - this->scroll_); 98 98 this->scroll_ = scroll; 99 99 } … … 147 147 SUPER( OverlayGroup, changedVisibility ); 148 148 149 for ( std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)150 ( *it)->changedVisibility(); //inform all Child Overlays that our visibility has changed149 for (const auto & elem : hudElements_) 150 (elem)->changedVisibility(); //inform all Child Overlays that our visibility has changed 151 151 } 152 152 … … 155 155 this->owner_ = owner; 156 156 157 for ( std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)158 ( *it)->setOwner(owner);157 for (const auto & elem : hudElements_) 158 (elem)->setOwner(owner); 159 159 } 160 160
Note: See TracChangeset
for help on using the changeset viewer.