summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-11-25 18:43:28 +0000
committerIra Rice <irarice@gmail.com>2008-11-25 18:43:28 +0000
commit886a5d4803e277b053014ae6b5c1c347f7756d48 (patch)
treee24d94a1652470c27a2dbe26eed7a1923d43adb3 /src/inventory.cpp
parentd5e30d8f72184241034aa797471c31a5bcbaa095 (diff)
downloadmana-886a5d4803e277b053014ae6b5c1c347f7756d48.tar.gz
mana-886a5d4803e277b053014ae6b5c1c347f7756d48.tar.bz2
mana-886a5d4803e277b053014ae6b5c1c347f7756d48.tar.xz
mana-886a5d4803e277b053014ae6b5c1c347f7756d48.zip
Miscellaneous TMW change commits. Missed these changes before because of
a confusion on git.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 764d7fee..d346a50b 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -124,19 +124,19 @@ bool Inventory::contains(Item *item) const
return false;
}
-int Inventory::getFreeSlot()
+int Inventory::getFreeSlot() const
{
Item **i = std::find_if(mItems + 2, mItems + mSize,
std::not1(SlotUsed()));
return (i == mItems + mSize) ? -1 : (i - mItems);
}
-int Inventory::getNumberOfSlotsUsed()
+int Inventory::getNumberOfSlotsUsed() const
{
return count_if(mItems, mItems + mSize, SlotUsed());
}
-int Inventory::getLastUsedSlot()
+int Inventory::getLastUsedSlot() const
{
for (int i = mSize - 1; i >= 0; i--) {
if (SlotUsed()(mItems[i])) {