From ce873108aa91d19104f46c5acd3350385e7a4541 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Fri, 30 Mar 2018 18:32:52 +0200 Subject: Client eventmanager refactor (#7179) * Drop EventManager from GameDef & do some client cleanups * EventManager is only used by Client. Don't expose it on Server & GameDef for nothing * Drop Client::event() in favor of direct calls to getEventManager * Cleanup some event put from new + put to put(new) * MtEvent: add Type(u8) enum * This will enhance event performance & ensure stricter type * Drop MtEvent::checkIs (unused) * clang-tidy reported fixes * Code style * Move event_manager.h to the client directory as it's only used by client Add EventManager unittests + switch to unordered_map as order is not important here Drop a unused function --- src/unittest/test.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/unittest/test.cpp') diff --git a/src/unittest/test.cpp b/src/unittest/test.cpp index 18215a947..7a0ef16b1 100644 --- a/src/unittest/test.cpp +++ b/src/unittest/test.cpp @@ -51,7 +51,6 @@ public: ITextureSource *getTextureSource() { return m_texturesrc; } IShaderSource *getShaderSource() { return m_shadersrc; } ISoundManager *getSoundManager() { return m_soundmgr; } - MtEventManager *getEventManager() { return m_eventmgr; } scene::ISceneManager *getSceneManager() { return m_scenemgr; } IRollbackManager *getRollbackManager() { return m_rollbackmgr; } EmergeManager *getEmergeManager() { return m_emergemgr; } @@ -86,7 +85,6 @@ private: ITextureSource *m_texturesrc = nullptr; IShaderSource *m_shadersrc = nullptr; ISoundManager *m_soundmgr = nullptr; - MtEventManager *m_eventmgr = nullptr; scene::ISceneManager *m_scenemgr = nullptr; IRollbackManager *m_rollbackmgr = nullptr; EmergeManager *m_emergemgr = nullptr; -- cgit v1.2.3