diff options
Diffstat (limited to 'src/event.cpp')
-rw-r--r-- | src/event.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/event.cpp b/src/event.cpp index 7c9b6f45..55782300 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -179,12 +179,8 @@ void Event::trigger(Channel channel, const Event &event) return; // Loop though all listeners - auto lit = it->second.begin(); - while (lit != it->second.end()) - { - (*lit)->event(channel, event); - lit++; - } + for (auto *listener : it->second) + listener->event(channel, event); } void Event::bind(EventListener *listener, Channel channel) |