From 7ba3d9ca2bcec0a86f4551dee60d970183423ef9 Mon Sep 17 00:00:00 2001 From: KobeBryant114514 <116721335+KobeBryant114514@users.noreply.github.com> Date: Sat, 21 Sep 2024 21:34:38 +0800 Subject: [PATCH] refactor: remove useless code --- src/EventAPI.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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) {