From 638206c925cbe6db40b0ccdf7a39bc8029c6b9fa Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Mon, 24 Jun 2024 17:46:48 +0200 Subject: Removed a bunch of unused NPC related events Nobody cared for the events that were emitted when NPC related network messages had been sent. --- src/event.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/event.cpp') 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) -- cgit v1.2.3-70-g09d2