diff options
-rw-r--r-- | src/being/localplayer.cpp | 4 | ||||
-rw-r--r-- | src/being/localplayer.h | 4 | ||||
-rw-r--r-- | src/commandhandler.cpp | 2 | ||||
-rw-r--r-- | src/commandhandler.h | 2 | ||||
-rw-r--r-- | src/eventsmanager.cpp | 4 | ||||
-rw-r--r-- | src/eventsmanager.h | 4 | ||||
-rw-r--r-- | src/gui/popups/statuspopup.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/namesmodel.h | 2 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 4 | ||||
-rw-r--r-- | src/input/keyboardconfig.cpp | 2 | ||||
-rw-r--r-- | src/input/keyboardconfig.h | 4 | ||||
-rw-r--r-- | src/spellmanager.cpp | 4 | ||||
-rw-r--r-- | src/spellmanager.h | 6 | ||||
-rw-r--r-- | src/utils/translation/poparser.cpp | 2 | ||||
-rw-r--r-- | src/utils/translation/poparser.h | 2 |
15 files changed, 25 insertions, 25 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index a8caa73fa..cc8436408 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -2121,7 +2121,7 @@ static const char *const debugPathStrings[] = N_("(b) black & white map view") }; -std::string LocalPlayer::getDebugPathString() const +std::string LocalPlayer::getDebugPathString() { return gettext(getVarItem(&debugPathStrings[0], viewport->getDebugPath(), debugPathSize)); @@ -2277,7 +2277,7 @@ static const char *const cameraModeStrings[] = N_("(?) away") }; -std::string LocalPlayer::getCameraModeString() const +std::string LocalPlayer::getCameraModeString() { return gettext(getVarItem(&cameraModeStrings[0], viewport->getCameraMode(), cameraModeSize)); diff --git a/src/being/localplayer.h b/src/being/localplayer.h index c8fa5a32a..6ba12bd56 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -489,7 +489,7 @@ class LocalPlayer final : public Being, std::string getPickUpTypeString(); - std::string getDebugPathString() const; + static std::string getDebugPathString(); std::string getMagicAttackString(); @@ -499,7 +499,7 @@ class LocalPlayer final : public Being, std::string getAwayModeString(); - std::string getCameraModeString() const; + static std::string getCameraModeString(); std::string getGameModifiersString(); diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 8409b8d58..6d3881432 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -68,7 +68,7 @@ void CommandHandler::handleCommands(const std::string &command, } void CommandHandler::handleCommand(const std::string &command, - ChatTab *const tab) + ChatTab *const tab) const { const size_t pos = command.find(' '); const std::string type(command, 0, pos); diff --git a/src/commandhandler.h b/src/commandhandler.h index 02ced5630..de1561d74 100644 --- a/src/commandhandler.h +++ b/src/commandhandler.h @@ -62,7 +62,7 @@ class CommandHandler final * Parse and handle the given command. */ void handleCommand(const std::string &command, - ChatTab *const tab = localChatTab); + ChatTab *const tab = localChatTab) const; void handleCommands(const std::string &command, ChatTab *const tab = localChatTab); diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp index 85646010a..3062ac3d2 100644 --- a/src/eventsmanager.cpp +++ b/src/eventsmanager.cpp @@ -100,7 +100,7 @@ bool EventsManager::handleCommonEvents(const SDL_Event &event) const return false; } -bool EventsManager::handleEvents() +bool EventsManager::handleEvents() const { if (Game::instance()) { @@ -157,7 +157,7 @@ bool EventsManager::handleEvents() return false; } -void EventsManager::handleGameEvents() +void EventsManager::handleGameEvents() const { Game *const game = Game::instance(); diff --git a/src/eventsmanager.h b/src/eventsmanager.h index f4136e35c..5433a83fb 100644 --- a/src/eventsmanager.h +++ b/src/eventsmanager.h @@ -42,11 +42,11 @@ class EventsManager final : public ConfigListener void shutdown(); - bool handleEvents(); + bool handleEvents() const; bool handleCommonEvents(const SDL_Event &event) const; - void handleGameEvents(); + void handleGameEvents() const; #ifdef USE_SDL2 static void handleSDL2WindowEvent(const SDL_Event &event); diff --git a/src/gui/popups/statuspopup.cpp b/src/gui/popups/statuspopup.cpp index 7944d1400..1d696fe82 100644 --- a/src/gui/popups/statuspopup.cpp +++ b/src/gui/popups/statuspopup.cpp @@ -154,7 +154,7 @@ void StatusPopup::updateLabels() const Input::KEY_SWITCH_QUICK_DROP); setLabelText(7, player_node->getPickUpTypeString(), Input::KEY_CHANGE_PICKUP_TYPE); - setLabelText(8, player_node->getDebugPathString(), + setLabelText(8, LocalPlayer::getDebugPathString(), Input::KEY_PATHFIND); setLabelText(9, player_node->getMagicAttackString(), Input::KEY_SWITCH_MAGIC_ATTACK); @@ -166,6 +166,6 @@ void StatusPopup::updateLabels() const Input::KEY_CHANGE_IMITATION_MODE); setLabelText(13, player_node->getAwayModeString(), Input::KEY_AWAY); - setLabelText(14, player_node->getCameraModeString(), + setLabelText(14, LocalPlayer::getCameraModeString(), Input::KEY_CAMERA); } diff --git a/src/gui/widgets/namesmodel.h b/src/gui/widgets/namesmodel.h index c64c6ea26..f70dd2571 100644 --- a/src/gui/widgets/namesmodel.h +++ b/src/gui/widgets/namesmodel.h @@ -43,7 +43,7 @@ class NamesModel : public gcn::ListModel StringVect &getNames() A_WARN_UNUSED { return mNames; } - size_t size() A_WARN_UNUSED + size_t size() const A_WARN_UNUSED { return mNames.size(); } void clear() diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 62c5c38ba..80e86e66f 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -733,10 +733,10 @@ void StatusWindow::updateStatusBar(ProgressBar *const bar, player_node->getQuickDropCounterString())) .append(translateLetter2(player_node->getPickUpTypeString())) .append(" ").append(translateLetter2( - player_node->getDebugPathString())) + LocalPlayer::getDebugPathString())) .append(" ").append(translateLetter2( player_node->getImitationModeString())) - .append(translateLetter2(player_node->getCameraModeString())) + .append(translateLetter2(LocalPlayer::getCameraModeString())) .append(translateLetter2(player_node->getAwayModeString()))); bar->setProgress(50); diff --git a/src/input/keyboardconfig.cpp b/src/input/keyboardconfig.cpp index d849c54d2..3756e27fb 100644 --- a/src/input/keyboardconfig.cpp +++ b/src/input/keyboardconfig.cpp @@ -72,7 +72,7 @@ int KeyboardConfig::getKeyValueFromEvent(const SDL_Event &event) return 0; } -int KeyboardConfig::getKeyIndex(const SDL_Event &event, const int grp) const +int KeyboardConfig::getKeyIndex(const SDL_Event &event, const int grp) { const int keyValue = getKeyValueFromEvent(event); return inputManager.getKeyIndex(keyValue, grp, INPUT_KEYBOARD); diff --git a/src/input/keyboardconfig.h b/src/input/keyboardconfig.h index b43f22790..7f7102964 100644 --- a/src/input/keyboardconfig.h +++ b/src/input/keyboardconfig.h @@ -56,8 +56,8 @@ class KeyboardConfig final /** * Get the key function index by providing the keys value. */ - int getKeyIndex(const SDL_Event &event, - const int grp = 1) const A_WARN_UNUSED; + static int getKeyIndex(const SDL_Event &event, + const int grp = 1) A_WARN_UNUSED; /** * Set the enable flag, which will stop the user from doing actions. diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp index 5a9d5cc4f..b1fad932a 100644 --- a/src/spellmanager.cpp +++ b/src/spellmanager.cpp @@ -165,7 +165,7 @@ void SpellManager::invoke(const int spellId) const } } -void SpellManager::invokeSpell(const TextCommand *const spell) const +void SpellManager::invokeSpell(const TextCommand *const spell) { if (!chatWindow || !spell) return; @@ -173,7 +173,7 @@ void SpellManager::invokeSpell(const TextCommand *const spell) const } void SpellManager::invokeSpell(const TextCommand *const spell, - const Being *const target) const + const Being *const target) { if (!chatWindow || !spell || !target) return; diff --git a/src/spellmanager.h b/src/spellmanager.h index 9fb5da850..f2830edb6 100644 --- a/src/spellmanager.h +++ b/src/spellmanager.h @@ -70,10 +70,10 @@ class SpellManager final private: void fillSpells(); - void invokeSpell(const TextCommand *const spell, - const Being *const target) const; + static void invokeSpell(const TextCommand *const spell, + const Being *const target); - void invokeSpell(const TextCommand *const spell) const; + static void invokeSpell(const TextCommand *const spell); static std::string parseCommand(std::string command, const Being *const target) diff --git a/src/utils/translation/poparser.cpp b/src/utils/translation/poparser.cpp index abe9fdf26..f0ab95005 100644 --- a/src/utils/translation/poparser.cpp +++ b/src/utils/translation/poparser.cpp @@ -226,7 +226,7 @@ PoDict *PoParser::getEmptyDict() return new PoDict(""); } -bool PoParser::checkLang(std::string lang) const +bool PoParser::checkLang(std::string lang) { // check is po file exists const ResourceManager *const resman = ResourceManager::getInstance(); diff --git a/src/utils/translation/poparser.h b/src/utils/translation/poparser.h index b4dc8a6bd..08a6ac7b1 100644 --- a/src/utils/translation/poparser.h +++ b/src/utils/translation/poparser.h @@ -39,7 +39,7 @@ class PoParser final const std::string &restrict fileName = "", PoDict *restrict const dict = nullptr); - bool checkLang(std::string lang) const; + static bool checkLang(std::string lang); static PoDict *getEmptyDict(); |