diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-21 00:45:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-21 00:45:24 +0300 |
commit | cfa5391c1be51ef49380e398a72c813255d6316e (patch) | |
tree | 32e9f77ae80e72a6388923dddb90721e661394e5 /src/gui/tradewindow.h | |
parent | 31acb66791e27b6cfa846302156ad2e7a88f5f04 (diff) | |
download | mv-cfa5391c1be51ef49380e398a72c813255d6316e.tar.gz mv-cfa5391c1be51ef49380e398a72c813255d6316e.tar.bz2 mv-cfa5391c1be51ef49380e398a72c813255d6316e.tar.xz mv-cfa5391c1be51ef49380e398a72c813255d6316e.zip |
first part of checks and style fixes.
Diffstat (limited to 'src/gui/tradewindow.h')
-rw-r--r-- | src/gui/tradewindow.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/gui/tradewindow.h b/src/gui/tradewindow.h index 3b6967772..09c918794 100644 --- a/src/gui/tradewindow.h +++ b/src/gui/tradewindow.h @@ -65,13 +65,13 @@ class TradeWindow : public Window, /** * Displays expected money in the trade window. */ - void setMoney(int quantity); + void setMoney(const int quantity); /** * Add an item to the trade window. */ - void addItem(int id, bool own, int quantity, - int refine, unsigned char color); + void addItem(const int id, const bool own, const int quantity, + const int refine, const unsigned char color); /** * Reset both item containers @@ -81,13 +81,15 @@ class TradeWindow : public Window, /** * Add an item to the trade window. */ - void addItem2(int id, bool own, int quantity, int refine, - unsigned char color, bool equipment); + void addItem2(const int id, const bool own, const int quantity, + const int refine, const unsigned char color, + const bool equipment); /** * Change quantity of an item. */ - void changeQuantity(int index, bool own, int quantity); + void changeQuantity(const int index, const bool own, + const int quantity); /** * Increase quantity of an item. @@ -97,12 +99,13 @@ class TradeWindow : public Window, /** * Player received ok message from server */ - void receivedOk(bool own); + void receivedOk(const bool own); /** * Send trade packet. */ - void tradeItem(Item *item, int quantity, bool check = false); + void tradeItem(Item *const item, const int quantity, + const bool check = false); /** * Updates the labels and makes sure only one item is selected in @@ -129,18 +132,19 @@ class TradeWindow : public Window, /** * Add item what will be added to trade. */ - void addAutoItem(std::string nick, Item* item, int amount); + void addAutoItem(const std::string nick, Item *const item, + const int amount); - void addAutoMoney(std::string nick, int money); + void addAutoMoney(const std::string nick, const int money); void initTrade(std::string nick); std::string getAutoTradeNick() const { return mAutoAddToNick; } - bool checkItem(Item *item); + bool checkItem(const Item *const item) const; - bool isInpupFocused(); + bool isInpupFocused() const; private: enum Status @@ -154,7 +158,7 @@ class TradeWindow : public Window, /** * Sets the current status of the trade. */ - void setStatus(Status s); + void setStatus(const Status s); typedef const std::auto_ptr<Inventory> InventoryPtr; InventoryPtr mMyInventory; |