From cfa5391c1be51ef49380e398a72c813255d6316e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 21 Aug 2012 00:45:24 +0300 Subject: first part of checks and style fixes. --- src/gui/tradewindow.h | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'src/gui/tradewindow.h') 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 InventoryPtr; InventoryPtr mMyInventory; -- cgit v1.2.3-60-g2f50