summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-09 01:23:14 -0600
committerIra Rice <irarice@gmail.com>2009-03-09 01:23:14 -0600
commit40883938ceb60b0999f9b693dadbe2239e83f139 (patch)
tree594edf50f129f6e6a09b8f139495fdc4bf587684 /src/inventory.cpp
parent5fa3f62d0d6d9cbffeef0f6a2497aae023dbadcf (diff)
downloadmana-40883938ceb60b0999f9b693dadbe2239e83f139.tar.gz
mana-40883938ceb60b0999f9b693dadbe2239e83f139.tar.bz2
mana-40883938ceb60b0999f9b693dadbe2239e83f139.tar.xz
mana-40883938ceb60b0999f9b693dadbe2239e83f139.zip
Got rid of an ugly and unified interface breaking cancel button in favor
of adding overridable close functionality to the Window class. Now, if you need a close button, but need to do something different, or in addition to the Window close functionality, you can override it and do that action. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index d72e0e4a..3d1a4786 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -128,7 +128,7 @@ bool Inventory::contains(Item *item) const
int Inventory::getFreeSlot() const
{
- Item **i = std::find_if(mItems, mItems + mSize,
+ Item **i = std::find_if(mItems + mOffset, mItems + mSize,
std::not1(SlotUsed()));
return (i == mItems + mSize) ? -1 : (i - mItems);
}