summaryrefslogtreecommitdiff
path: root/src/shopitem.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-15 22:22:33 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-15 22:36:14 +0200
commit2a3f16f5673e6482e422a65f6f23f958dd78955f (patch)
tree63f81e0fc00e9a2f29bfe3ca0e13e2351994de0b /src/shopitem.h
parent1b44c6d73784c0f222c3d1f09214936acb5561f7 (diff)
downloadmana-2a3f16f5673e6482e422a65f6f23f958dd78955f.tar.gz
mana-2a3f16f5673e6482e422a65f6f23f958dd78955f.tar.bz2
mana-2a3f16f5673e6482e422a65f6f23f958dd78955f.tar.xz
mana-2a3f16f5673e6482e422a65f6f23f958dd78955f.zip
Assorted random cleanups
Diffstat (limited to 'src/shopitem.h')
-rw-r--r--src/shopitem.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/shopitem.h b/src/shopitem.h
index f552c0fe..33021d8c 100644
--- a/src/shopitem.h
+++ b/src/shopitem.h
@@ -63,21 +63,22 @@ 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(int inventoryIndex, int quantity);
/**
* Add a duplicate. Id and price will be taken from this item.
* Needed for compatibility with ShopDuplicateItems (see) class
* documentation).
*/
- void addDuplicate ();
+ void addDuplicate();
/**
* Gets the quantity of the currently topmost duplicate.
*
* @return the quantity of the currently topmost duplicate
*/
- int getCurrentQuantity() {
+ int getCurrentQuantity() const
+ {
return mDuplicates.empty() ? 0 : mDuplicates.top()->quantity;
}
@@ -86,7 +87,8 @@ class ShopItem : public Item
*
* @return the inventory index of the currently topmost duplicate
*/
- int getCurrentInvIndex() {
+ int getCurrentInvIndex() const
+ {
return mDuplicates.empty() ? mInvIndex :
mDuplicates.top()->inventoryIndex;
}