- Timestamp:
- Nov 21, 2015, 7:05:53 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/modules/objects/eventsystem/EventDispatcher.cc
r10768 r10821 45 45 { 46 46 if (this->isInitialized()) 47 for ( std::list<BaseObject*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)48 ( *it)->destroy();47 for (auto & elem : this->targets_) 48 (elem)->destroy(); 49 49 } 50 50 … … 61 61 void EventDispatcher::processEvent(Event& event) 62 62 { 63 for ( std::list<BaseObject*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)64 ( *it)->processEvent(event);63 for (auto & elem : this->targets_) 64 (elem)->processEvent(event); 65 65 } 66 66 … … 73 73 { 74 74 unsigned int i = 0; 75 for ( std::list<BaseObject*>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)75 for (const auto & elem : this->targets_) 76 76 { 77 77 if (i == index) 78 return ( *it);78 return (elem); 79 79 ++i; 80 80 }
Note: See TracChangeset
for help on using the changeset viewer.