summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-02 12:46:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-02 12:46:32 +0300
commit11caa7aeeb3a7b40823da8573576d2354b7504b5 (patch)
treefe34c20ea973e65104747b59675acf6363e7b5d2 /src/gui/windows
parent0c4ed5a9594b849b436fca13c6992dee923915ed (diff)
downloadmv-11caa7aeeb3a7b40823da8573576d2354b7504b5.tar.gz
mv-11caa7aeeb3a7b40823da8573576d2354b7504b5.tar.bz2
mv-11caa7aeeb3a7b40823da8573576d2354b7504b5.tar.xz
mv-11caa7aeeb3a7b40823da8573576d2354b7504b5.zip
Add missing const and static into gui classes.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/chatwindow.cpp8
-rw-r--r--src/gui/windows/chatwindow.h8
-rw-r--r--src/gui/windows/equipmentwindow.cpp2
-rw-r--r--src/gui/windows/equipmentwindow.h2
-rw-r--r--src/gui/windows/outfitwindow.cpp2
-rw-r--r--src/gui/windows/outfitwindow.h2
-rw-r--r--src/gui/windows/shopwindow.cpp2
-rw-r--r--src/gui/windows/shopwindow.h2
-rw-r--r--src/gui/windows/statuswindow.cpp2
-rw-r--r--src/gui/windows/statuswindow.h5
-rw-r--r--src/gui/windows/whoisonline.h2
11 files changed, 19 insertions, 18 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 6af18ff06..955171bea 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -452,7 +452,7 @@ ChatTab *ChatWindow::getFocused() const
return static_cast<ChatTab*>(mChatTabs->getSelectedTab());
}
-void ChatWindow::clearTab(ChatTab *const tab) const
+void ChatWindow::clearTab(ChatTab *const tab)
{
if (tab)
tab->clearText();
@@ -1386,7 +1386,7 @@ void ChatWindow::autoComplete()
}
std::string ChatWindow::autoComplete(StringVect &names,
- std::string partName) const
+ std::string partName)
{
StringVectCIter i = names.begin();
const StringVectCIter i_end = names.end();
@@ -1770,7 +1770,7 @@ void ChatWindow::saveState() const
}
}
-std::string ChatWindow::doReplace(const std::string &msg) const
+std::string ChatWindow::doReplace(const std::string &msg)
{
std::string str = msg;
replaceSpecialChars(str);
@@ -1918,7 +1918,7 @@ void ChatWindow::updateVisibility()
int mouseY = 0;
int x = 0;
int y = 0;
- gui->getMouseState(&mouseX, &mouseY);
+ Gui::getMouseState(&mouseX, &mouseY);
getAbsolutePosition(x, y);
if (mChatInput->isVisible())
{
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index c000215f1..3093c52e9 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -109,7 +109,7 @@ class ChatWindow final : public Window,
/**
* Clear the given tab.
*/
- void clearTab(ChatTab *const tab) const;
+ static void clearTab(ChatTab *const tab);
/**
* Clear the current tab.
@@ -253,7 +253,7 @@ class ChatWindow final : public Window,
void loadGMCommands();
- std::string doReplace(const std::string &msg) const A_WARN_UNUSED;
+ static std::string doReplace(const std::string &msg) A_WARN_UNUSED;
void adjustTabSize();
@@ -328,8 +328,8 @@ class ChatWindow final : public Window,
std::string autoComplete(const std::string &partName,
History *const words) const;
- std::string autoComplete(StringVect &names,
- std::string partName) const;
+ static std::string autoComplete(StringVect &names,
+ std::string partName);
/** Used for showing item popup on clicking links **/
ItemLinkHandler *mItemLinkHandler;
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 621f5e537..dcc4c9d77 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -552,7 +552,7 @@ void EquipmentWindow::loadSlot(const XmlNodePtr slotNode,
mMaxY = y + mBoxSize;
}
-int EquipmentWindow::parseSlotName(const std::string &name) const
+int EquipmentWindow::parseSlotName(const std::string &name)
{
int id = -1;
if (name == "shoes" || name == "boot" || name == "boots")
diff --git a/src/gui/windows/equipmentwindow.h b/src/gui/windows/equipmentwindow.h
index d291a5f81..7387fb249 100644
--- a/src/gui/windows/equipmentwindow.h
+++ b/src/gui/windows/equipmentwindow.h
@@ -122,7 +122,7 @@ class EquipmentWindow final : public Window, public gcn::ActionListener
void loadSlot(const XmlNodePtr slotNode,
const ImageSet *const imageset);
- int parseSlotName(const std::string &name) const A_WARN_UNUSED;
+ static int parseSlotName(const std::string &name) A_WARN_UNUSED;
Equipment *mEquipment;
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index c5df4b652..d686056ac 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -524,7 +524,7 @@ void OutfitWindow::unequipNotInOutfit(const int outfit) const
}
}
-std::string OutfitWindow::keyName(const int number) const
+std::string OutfitWindow::keyName(const int number)
{
if (number < 0 || number >= SHORTCUT_EMOTES)
return "";
diff --git a/src/gui/windows/outfitwindow.h b/src/gui/windows/outfitwindow.h
index 4f6e5c0bf..eeedc2ec6 100644
--- a/src/gui/windows/outfitwindow.h
+++ b/src/gui/windows/outfitwindow.h
@@ -89,7 +89,7 @@ class OutfitWindow final : public Window,
void showCurrentOutfit();
- std::string keyName(const int number) const A_WARN_UNUSED;
+ static std::string keyName(const int number) A_WARN_UNUSED;
void clearCurrentOutfit();
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 48bfedb06..a940e4cdb 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -632,7 +632,7 @@ void ShopWindow::sendMessage(const std::string &nick,
chatWindow->addWhisper(nick, data, BY_PLAYER);
}
-void ShopWindow::showList(const std::string &nick, std::string data) const
+void ShopWindow::showList(const std::string &nick, std::string data)
{
BuyDialog *buyDialog = nullptr;
SellDialog *sellDialog = nullptr;
diff --git a/src/gui/windows/shopwindow.h b/src/gui/windows/shopwindow.h
index 590a05dcc..95eee1e05 100644
--- a/src/gui/windows/shopwindow.h
+++ b/src/gui/windows/shopwindow.h
@@ -121,7 +121,7 @@ class ShopWindow final : public Window,
void sendMessage(const std::string &nick, std::string data,
const bool random = false);
- void showList(const std::string &nick, std::string data) const;
+ static void showList(const std::string &nick, std::string data);
void processRequest(const std::string &nick, std::string data,
const int mode);
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 567460927..8d78447a7 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -606,7 +606,7 @@ void StatusWindow::updateJobBar(ProgressBar *const bar, const bool percent)
}
void StatusWindow::updateProgressBar(ProgressBar *const bar, const int id,
- const bool percent) const
+ const bool percent)
{
const std::pair<int, int> exp = PlayerInfo::getStatExperience(id);
updateProgressBar(bar, exp.first, exp.second, percent);
diff --git a/src/gui/windows/statuswindow.h b/src/gui/windows/statuswindow.h
index 414449df0..94f1aaa65 100644
--- a/src/gui/windows/statuswindow.h
+++ b/src/gui/windows/statuswindow.h
@@ -79,8 +79,9 @@ class StatusWindow final : public Window,
const bool percent = true);
static void updateProgressBar(ProgressBar *const bar, const int value,
const int max, const bool percent);
- void updateProgressBar(ProgressBar *const bar, const int id,
- const bool percent = true) const;
+ static void updateProgressBar(ProgressBar *const bar,
+ const int id,
+ const bool percent = true);
void action(const gcn::ActionEvent &event) override;
diff --git a/src/gui/windows/whoisonline.h b/src/gui/windows/whoisonline.h
index 1057f1898..10a8be4b5 100644
--- a/src/gui/windows/whoisonline.h
+++ b/src/gui/windows/whoisonline.h
@@ -153,7 +153,7 @@ public:
void readFromWeb();
- void setNeutralColor(OnlinePlayer *const player);
+ static void setNeutralColor(OnlinePlayer *const player);
void getPlayerNames(StringVect &names);