summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r--src/gui/itemcontainer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 874c0b63..e0730ced 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -76,8 +76,7 @@ void ItemContainer::draw(gcn::Graphics* graphics)
{
int gridWidth = mItemset->get(0)->getWidth() + 4;
int gridHeight = mItemset->get(0)->getHeight() + 10;
- int w = getWidth();
- int columns = w / gridWidth;
+ int columns = getWidth() / gridWidth;
// Have at least 1 column
if (columns < 1)
@@ -170,8 +169,7 @@ void ItemContainer::mousePress(int mx, int my, int button)
{
int gridWidth = mItemset->get(0)->getWidth() + 4;
int gridHeight = mItemset->get(0)->getHeight() + 10;
- int w = getWidth();
- int columns = w / gridWidth;
+ int columns = getWidth() / gridWidth;
if (button == gcn::MouseInput::LEFT || gcn::MouseInput::RIGHT)
{