summaryrefslogtreecommitdiff
path: root/src/gui/shopwindow.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-28 01:59:04 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-28 01:59:04 +0300
commitc79403e1341ac533df1771b866d1f5cee15e12b5 (patch)
tree5bed6dfb44f7fce0432bd7a7a28d2d23db07ce80 /src/gui/shopwindow.h
parent7c79aa2b8e484319e3e511fa21db6d2448347024 (diff)
downloadmanaplus-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.gz
manaplus-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.bz2
manaplus-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.xz
manaplus-c79403e1341ac533df1771b866d1f5cee15e12b5.zip
Add const to more classes.
Diffstat (limited to 'src/gui/shopwindow.h')
-rw-r--r--src/gui/shopwindow.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/gui/shopwindow.h b/src/gui/shopwindow.h
index dc9ae324b..58725afcf 100644
--- a/src/gui/shopwindow.h
+++ b/src/gui/shopwindow.h
@@ -97,20 +97,22 @@ class ShopWindow : public Window, public gcn::ActionListener,
static bool isActive()
{ return !instances.empty(); }
- void setItemSelected(int id)
+ void setItemSelected(const int id)
{ mSelectedItem = id; updateButtonsAndLabels(); }
- void addBuyItem(Item *item, int amount, int price);
+ void addBuyItem(const Item *const item, const int amount,
+ const int price);
- void addSellItem(Item *item, int amount, int price);
+ void addSellItem(const Item *const item, const int amount,
+ const int price);
void loadList();
void saveList();
- void announce(ShopItems *list, int mode);
+ void announce(ShopItems *const list, const int mode);
- void giveList(const std::string &nick, int mode);
+ void giveList(const std::string &nick, const int mode);
void setAcceptPlayer(std::string name)
{ mAcceptPlayer = name; }
@@ -119,19 +121,20 @@ class ShopWindow : public Window, public gcn::ActionListener,
{ return mAcceptPlayer; }
void sendMessage(const std::string &nick, std::string data,
- bool random = false);
+ const bool random = false);
- void showList(const std::string &nick, std::string data);
+ void showList(const std::string &nick, std::string data) const;
- void processRequest(std::string nick, std::string data, int mode);
+ void processRequest(std::string nick, std::string data,
+ const int mode);
- bool findShopItem(ShopItem *shopItem, int mode);
+ bool findShopItem(const ShopItem *const shopItem, const int mode);
- int sumAmount(Item *shopItem);
+ static int sumAmount(const Item *const shopItem);
void updateTimes();
- bool checkFloodCounter(int &counterTime);
+ bool checkFloodCounter(int &counterTime) const;
bool isShopEmpty();