Changeset 10821 for code/branches/cpp11_v2/src/modules/objects/Attacher.cc
- Timestamp:
- Nov 21, 2015, 7:05:53 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/modules/objects/Attacher.cc
r10768 r10821 61 61 SUPER(Attacher, changedActivity); 62 62 63 for ( std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)64 ( *it)->setActive(this->isActive());63 for (auto & elem : this->objects_) 64 (elem)->setActive(this->isActive()); 65 65 } 66 66 … … 69 69 SUPER(Attacher, changedVisibility); 70 70 71 for ( std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)72 ( *it)->setVisible(this->isVisible());71 for (auto & elem : this->objects_) 72 (elem)->setVisible(this->isVisible()); 73 73 } 74 74 … … 83 83 { 84 84 unsigned int i = 0; 85 for ( std::list<WorldEntity*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)85 for (const auto & elem : this->objects_) 86 86 { 87 87 if (i == index) 88 return ( *it);88 return (elem); 89 89 90 90 ++i;
Note: See TracChangeset
for help on using the changeset viewer.