From 866a71ffd576fd10c4e309195016d86f0c8ed635 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 3 Sep 2012 21:58:08 +0300 Subject: Add const to more classes. --- src/shopitem.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/shopitem.h') diff --git a/src/shopitem.h b/src/shopitem.h index 61d23a4ab..0608d0c4a 100644 --- a/src/shopitem.h +++ b/src/shopitem.h @@ -42,8 +42,9 @@ class ShopItem : public Item * @param quantity number of available copies of the item * @param price price of the item */ - ShopItem(int inventoryIndex, int id, unsigned char color, - int quantity, int price); + ShopItem(const int inventoryIndex, const int id, + const unsigned char color, + const int quantity, const int price); /** * Constructor. Creates a new ShopItem. Inventory index will be set to @@ -52,7 +53,7 @@ class ShopItem : public Item * @param id the id of the item * @param price price of the item */ - ShopItem(int id, unsigned char color, int price); + ShopItem(const int id, const unsigned char color, const int price); /** * Destructor. @@ -65,7 +66,7 @@ class ShopItem : public Item * @param inventoryIndex the inventory index of the item * @param quantity number of available copies of the item */ - void addDuplicate(int inventoryIndex, int quantity); + void addDuplicate(const int inventoryIndex, const int quantity); /** * Add a duplicate. Id and price will be taken from this item. @@ -108,7 +109,7 @@ class ShopItem : public Item * * @return the amount, that actually was sold. */ - int sellCurrentDuplicate(int quantity); + int sellCurrentDuplicate(const int quantity); /** * Gets the price of the item. -- cgit v1.2.3-60-g2f50