diff --git a/src/EventAPI.cpp b/src/EventAPI.cpp index 1b0eab3..42ba637 100644 --- a/src/EventAPI.cpp +++ b/src/EventAPI.cpp @@ -7,9 +7,6 @@ private: std::unordered_map mEventListeners; public: - LegacyScriptEventManager() {}; - ~LegacyScriptEventManager() {}; - std::string getNextEventId() { mNextEventId++; return "GMLIB_EVENT_" + std::to_string(mNextEventId); @@ -24,6 +21,7 @@ public: mEventListeners.erase(doHash(scriptEventId)); } +public: static LegacyScriptEventManager& getInstance() { static std::unique_ptr instance; if (!instance) {