From 5ec30d8915debef409f6db6f8ee9b822fb24d46b Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Wed, 20 Nov 2024 20:30:33 +0100 Subject: make format --- src/crepe/api/EventManager.hpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/crepe/api/EventManager.hpp') diff --git a/src/crepe/api/EventManager.hpp b/src/crepe/api/EventManager.hpp index d7afa9f..b2a94bd 100644 --- a/src/crepe/api/EventManager.hpp +++ b/src/crepe/api/EventManager.hpp @@ -10,10 +10,7 @@ subscription_t EventManager::subscribe(const EventHandler & callback, = std::make_unique>(callback); std::vector & handlers = this->subscribers[event_type]; handlers.emplace_back(CallbackEntry{ - .callback = std::move(handler), - .channel = channel, - .id = subscription_counter - }); + .callback = std::move(handler), .channel = channel, .id = subscription_counter}); return subscription_counter; } @@ -25,9 +22,8 @@ void EventManager::queue_event(const EventType & event, int channel) { auto event_ptr = std::make_unique(event); - this->events_queue.push_back(QueueEntry{.event = std::move(event_ptr), - .channel = channel, - .type = event_type}); + this->events_queue.push_back( + QueueEntry{.event = std::move(event_ptr), .channel = channel, .type = event_type}); } template @@ -49,5 +45,4 @@ void EventManager::trigger_event(const EventType & event, int channel) { } } - } // namespace crepe -- cgit v1.2.3