diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-14 16:40:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-14 16:40:47 +0300 |
commit | b8b4e4c524331b4deb0a6caa8da004430297c98a (patch) | |
tree | a2fd6f1db45e76f08c0e5c1b4e57bbb86efba57b /src/game.cpp | |
parent | c28cd5ffb1ca37a3a6d5ee0a73828dcd092db7f1 (diff) | |
download | mv-b8b4e4c524331b4deb0a6caa8da004430297c98a.tar.gz mv-b8b4e4c524331b4deb0a6caa8da004430297c98a.tar.bz2 mv-b8b4e4c524331b4deb0a6caa8da004430297c98a.tar.xz mv-b8b4e4c524331b4deb0a6caa8da004430297c98a.zip |
Replace static members usage from pointers to direct classes.
clang-tidy warning: readability-static-accessed-through-instance
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
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 ++) |