aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/EventManager.hpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-20 20:30:33 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-20 20:30:33 +0100
commit5ec30d8915debef409f6db6f8ee9b822fb24d46b (patch)
tree6ed1f32c90b6464047c9e43134d1511cd3030af4 /src/crepe/api/EventManager.hpp
parent397da65e03ec681922aeea3881918026d36068a7 (diff)
make format
Diffstat (limited to 'src/crepe/api/EventManager.hpp')
-rw-r--r--src/crepe/api/EventManager.hpp11
1 files changed, 3 insertions, 8 deletions
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<EventType> & callback,
= std::make_unique<EventHandlerWrapper<EventType>>(callback);
std::vector<CallbackEntry> & 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<EventType>(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 <typename EventType>
@@ -49,5 +45,4 @@ void EventManager::trigger_event(const EventType & event, int channel) {
}
}
-
} // namespace crepe