aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/EventManager.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-13 12:33:16 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-13 12:33:16 +0100
commite4b3162d28a635af37dd7ca1f71db16e0d196864 (patch)
tree800bf855db81bf78ad9acdc09e98559c20945956 /src/crepe/api/EventManager.cpp
parentf1ba2a5607f23ed0b23d74240ea66cb1f8d2c1ad (diff)
moved get_instance
Diffstat (limited to 'src/crepe/api/EventManager.cpp')
-rw-r--r--src/crepe/api/EventManager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/crepe/api/EventManager.cpp b/src/crepe/api/EventManager.cpp
index 872c6eb..42bff12 100644
--- a/src/crepe/api/EventManager.cpp
+++ b/src/crepe/api/EventManager.cpp
@@ -1,5 +1,10 @@
#include "EventManager.h"
+EventManager & EventManager::get_instance() {
+ static EventManager instance;
+ return instance;
+}
+
void EventManager::dispatch_events() {
for (std::vector<std::tuple<std::unique_ptr<Event>, int, std::type_index>>::iterator event_it = this->events_queue.begin(); event_it != this->events_queue.end();) {
std::unique_ptr<Event>& event = std::get<0>(*event_it);