summaryrefslogtreecommitdiff
path: root/src/inventory.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-30 01:19:46 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-30 13:11:34 +0300
commit6b1684d33dec02eb6308bb3d8d3707f4d5252ba5 (patch)
tree4a0a5fd220828b92ef96446fe38dbe67ff446c6c /src/inventory.h
parent2a70a50c785ce639b76141a3a6887836d22fe12c (diff)
downloadplus-6b1684d33dec02eb6308bb3d8d3707f4d5252ba5.tar.gz
plus-6b1684d33dec02eb6308bb3d8d3707f4d5252ba5.tar.bz2
plus-6b1684d33dec02eb6308bb3d8d3707f4d5252ba5.tar.xz
plus-6b1684d33dec02eb6308bb3d8d3707f4d5252ba5.zip
Add unused warnings to some files.
Diffstat (limited to 'src/inventory.h')
-rw-r--r--src/inventory.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/inventory.h b/src/inventory.h
index ff4ffa3d7..db9e94769 100644
--- a/src/inventory.h
+++ b/src/inventory.h
@@ -76,13 +76,13 @@ class Inventory final
/**
* Returns the size that this instance is configured for.
*/
- unsigned getSize() const
+ unsigned getSize() const A_WARN_UNUSED
{ return mSize; }
/**
* Returns the item at the specified index.
*/
- Item *getItem(const int index) const;
+ Item *getItem(const int index) const A_WARN_UNUSED;
/**
* Searches for the specified item by it's id.
@@ -91,7 +91,8 @@ class Inventory final
* @param color The color of the item to be searched.
* @return Item found on success, NULL on failure.
*/
- Item *findItem(const int itemId, const unsigned char color) const;
+ Item *findItem(const int itemId,
+ const unsigned char color) const A_WARN_UNUSED;
/**
* Adds a new item in a free slot.
@@ -119,12 +120,12 @@ class Inventory final
/**
* Checks if the given item is in the inventory.
*/
- bool contains(const Item *const item) const;
+ bool contains(const Item *const item) const A_WARN_UNUSED;
/**
* Returns id of next free slot or -1 if all occupied.
*/
- int getFreeSlot() const;
+ int getFreeSlot() const A_WARN_UNUSED;
/**
* Reset all item slots.
@@ -134,28 +135,29 @@ class Inventory final
/**
* Get the number of slots filled with an item
*/
- int getNumberOfSlotsUsed() const
+ int getNumberOfSlotsUsed() const A_WARN_UNUSED
{ return mUsed; }
/**
* Returns the index of the last occupied slot or 0 if none occupied.
*/
- int getLastUsedSlot() const;
+ int getLastUsedSlot() const A_WARN_UNUSED;
void addInventoyListener(InventoryListener *const listener);
void removeInventoyListener(InventoryListener *const listener);
- int getType() const
+ int getType() const A_WARN_UNUSED
{ return mType; }
- bool isMainInventory() const
+ bool isMainInventory() const A_WARN_UNUSED
{ return mType == INVENTORY; }
Item *findItemBySprite(std::string spritePath,
- const Gender gender, const int race) const;
+ const Gender gender,
+ const int race) const A_WARN_UNUSED;
- std::string getName() const;
+ std::string getName() const A_WARN_UNUSED;
protected:
typedef std::list<InventoryListener*> InventoryListenerList;