From b8b4e4c524331b4deb0a6caa8da004430297c98a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 14 Aug 2017 16:40:47 +0300 Subject: Replace static members usage from pointers to direct classes. clang-tidy warning: readability-static-accessed-through-instance --- src/game.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index a9e9f26ff..b1687e953 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -340,8 +340,7 @@ static void destroyGuiWindows() whoIsOnline->setAllowUpdate(false); #ifdef TMWA_SUPPORT - if (guildManager != nullptr) - guildManager->clear(); + GuildManager::clear(); #endif // TMWA_SUPPORT delete2(windowMenu); @@ -1060,11 +1059,8 @@ void Game::changeMap(const std::string &mapPath) resetAdjustLevel(); ResourceManager::cleanProtected(); - if (popupManager != nullptr) - { - popupManager->clearPopup(); - popupManager->closePopupMenu(); - } + PopupManager::clearPopup(); + PopupManager::closePopupMenu(); // Clean up floor items, beings and particles if (actorManager != nullptr) @@ -1162,7 +1158,7 @@ void Game::updateHistory(const SDL_Event &event) { bool old = false; - const InputActionT key = keyboard.getKeyIndex(event); + const InputActionT key = KeyboardConfig::getKeyIndex(event); const time_t time = cur_time; int idx = -1; for (int f = 0; f < MAX_LASTKEYS; f ++) -- cgit v1.2.3-70-g09d2