diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-08 22:44:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-08 22:44:39 +0300 |
commit | a61ac4664d55cddb18d2d861e76629bd07676129 (patch) | |
tree | 59f5ba3ff7e65bbe94651db9ad2cf68b847d8f96 /src/gui | |
parent | bb3a85b045a6135f7228023a7ba55fb1c9e6bd90 (diff) | |
download | mv-a61ac4664d55cddb18d2d861e76629bd07676129.tar.gz mv-a61ac4664d55cddb18d2d861e76629bd07676129.tar.bz2 mv-a61ac4664d55cddb18d2d861e76629bd07676129.tar.xz mv-a61ac4664d55cddb18d2d861e76629bd07676129.zip |
Add some missing const.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 8 | ||||
-rw-r--r-- | src/gui/popups/popupmenu.h | 10 | ||||
-rw-r--r-- | src/gui/widgets/tabs/chat/chattab.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/tabs/chat/chattab.h | 2 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.h | 3 | ||||
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/inventorywindow.h | 2 | ||||
-rw-r--r-- | src/gui/windows/ministatuswindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/ministatuswindow.h | 2 |
10 files changed, 22 insertions, 14 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index b9fc252b8..a7c493b8e 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -989,7 +989,7 @@ void PopupMenu::showWindowPopup(Window *const window) showPopup(mX, mY); } -void PopupMenu::addWindowMenu(Window *const window) +void PopupMenu::addWindowMenu(const Window *const window) { if (!window) return; @@ -1756,7 +1756,7 @@ void PopupMenu::showItemPopup(const int x, const int y, } void PopupMenu::showItemPopup(const int x, const int y, - Item *const item) + const Item *const item) { mX = x; mY = y; @@ -1810,7 +1810,9 @@ void PopupMenu::showItemPopup(const int x, const int y, showPopup(x, y); } -void PopupMenu::showDropPopup(const int x, const int y, Item *const item) +void PopupMenu::showDropPopup(const int x, + const int y, + const Item *const item) { mX = x; mY = y; diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h index ca6d58ee6..dfcb64513 100644 --- a/src/gui/popups/popupmenu.h +++ b/src/gui/popups/popupmenu.h @@ -108,13 +108,17 @@ class PopupMenu final : public Popup, public LinkHandler void showPopup(const int x, const int y, MapItem *const mapItem); - void showItemPopup(const int x, const int y, Item *const item); + void showItemPopup(const int x, + const int y, + const Item *const item); void showItemPopup(const int x, const int y, const int itemId, const ItemColor color); - void showDropPopup(const int x, const int y, Item *const item); + void showDropPopup(const int x, + const int y, + const Item *const item); void showOutfitsWindowPopup(const int x, const int y); @@ -204,7 +208,7 @@ class PopupMenu final : public Popup, public LinkHandler void addNormalRelations(); - void addWindowMenu(Window *const window); + void addWindowMenu(const Window *const window); #ifdef EATHENA_SUPPORT void addChat(const Being *const being); diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp index 942ade320..3b074e64f 100644 --- a/src/gui/widgets/tabs/chat/chattab.cpp +++ b/src/gui/widgets/tabs/chat/chattab.cpp @@ -442,7 +442,7 @@ bool ChatTab::handleCommands(const std::string &type, const std::string &args) return handleCommand(type, args); } -void ChatTab::saveToLogFile(std::string msg) const +void ChatTab::saveToLogFile(const std::string &msg) const { if (chatLogger) { diff --git a/src/gui/widgets/tabs/chat/chattab.h b/src/gui/widgets/tabs/chat/chattab.h index 831c2a110..dc2062946 100644 --- a/src/gui/widgets/tabs/chat/chattab.h +++ b/src/gui/widgets/tabs/chat/chattab.h @@ -142,7 +142,7 @@ class ChatTab notfinal : public Tab ChatTabType::Type getType() const A_WARN_UNUSED { return mType; } - void saveToLogFile(std::string msg) const; + void saveToLogFile(const std::string &msg) const; const std::list<std::string> &getRows() const A_WARN_UNUSED { return mTextOutput->getRows(); } diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 057feb8d7..1551c10ae 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -1937,7 +1937,8 @@ void ChatWindow::saveState() const } } -bool ChatWindow::saveTab(const int num, ChatTab *const tab) const +bool ChatWindow::saveTab(const int num, + const ChatTab *const tab) const { if (!tab) return false; diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h index f586e97f7..644134158 100644 --- a/src/gui/windows/chatwindow.h +++ b/src/gui/windows/chatwindow.h @@ -245,7 +245,8 @@ class ChatWindow final : public Window, void saveState() const; - bool saveTab(const int num, ChatTab *const tab) const; + bool saveTab(const int num, + const ChatTab *const tab) const; void loadCustomList(); diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 76dfef268..e21299583 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -868,7 +868,7 @@ void InventoryWindow::updateWeight() Units::formatWeight(max).c_str())); } -void InventoryWindow::slotsChanged(Inventory *const inventory) +void InventoryWindow::slotsChanged(const Inventory *const inventory) { if (inventory == mInventory) { diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h index 930ce9e72..e19b219f8 100644 --- a/src/gui/windows/inventorywindow.h +++ b/src/gui/windows/inventorywindow.h @@ -125,7 +125,7 @@ class InventoryWindow final : public Window, */ void close() override final; - void slotsChanged(Inventory *const inventory) override final; + void slotsChanged(const Inventory *const inventory) override final; bool isMainInventory() const A_WARN_UNUSED { return mInventory ? mInventory->isMainInventory() : false; } diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index 1e43ce3b5..fc2e9a82c 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -535,7 +535,7 @@ void MiniStatusWindow::saveBars() const config.setValue("ministatussaved", true); } -void MiniStatusWindow::slotsChanged(Inventory *const inventory) +void MiniStatusWindow::slotsChanged(const Inventory *const inventory) { if (!inventory) return; diff --git a/src/gui/windows/ministatuswindow.h b/src/gui/windows/ministatuswindow.h index a26b8e06d..bdf4dcd29 100644 --- a/src/gui/windows/ministatuswindow.h +++ b/src/gui/windows/ministatuswindow.h @@ -83,7 +83,7 @@ class MiniStatusWindow final : public Window, void updateBars(); - void slotsChanged(Inventory *const inventory) override final; + void slotsChanged(const Inventory *const inventory) override final; std::vector <ProgressBar*> &getBars() A_WARN_UNUSED { return mBars; } |