summaryrefslogtreecommitdiff
path: root/src/gui/widgets/spellshortcutcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-15 22:21:02 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-15 22:21:02 +0300
commitca9fac131283ed536971799bef0d1fff4ef8adc1 (patch)
treeec70584d20b117c5d2446ef42b898eeacdda9d12 /src/gui/widgets/spellshortcutcontainer.cpp
parent29f929794c7519b049de0be3af635f05d7e83be6 (diff)
downloadmv-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.gz
mv-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.bz2
mv-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.xz
mv-ca9fac131283ed536971799bef0d1fff4ef8adc1.zip
Remove useless graphics casts.
Diffstat (limited to 'src/gui/widgets/spellshortcutcontainer.cpp')
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp
index 7c59676b9..696b0fbb4 100644
--- a/src/gui/widgets/spellshortcutcontainer.cpp
+++ b/src/gui/widgets/spellshortcutcontainer.cpp
@@ -103,12 +103,11 @@ void SpellShortcutContainer::draw(Graphics *graphics)
mBackgroundImg->setAlpha(mAlpha);
}
- Graphics *const g = static_cast<Graphics *const>(graphics);
gcn::Font *const font = getFont();
const int selectedId = spellShortcut->getSelectedItem();
- g->setColorAll(mForegroundColor, mForegroundColor2);
- drawBackground(g);
+ graphics->setColorAll(mForegroundColor, mForegroundColor2);
+ drawBackground(graphics);
for (unsigned i = 0; i < mMaxItems; i++)
{
@@ -118,7 +117,7 @@ void SpellShortcutContainer::draw(Graphics *graphics)
const int itemId = getItemByIndex(i);
if (selectedId >= 0 && itemId == selectedId)
{
- g->drawRectangle(gcn::Rectangle(itemX + 1, itemY + 1,
+ graphics->drawRectangle(gcn::Rectangle(itemX + 1, itemY + 1,
mBoxWidth - 1, mBoxHeight - 1));
}
@@ -135,11 +134,11 @@ void SpellShortcutContainer::draw(Graphics *graphics)
if (image)
{
image->setAlpha(1.0F);
- g->drawImage2(image, itemX, itemY);
+ graphics->drawImage2(image, itemX, itemY);
}
}
- font->drawString(g, spell->getSymbol(),
+ font->drawString(graphics, spell->getSymbol(),
itemX + 2, itemY + mBoxHeight / 2);
}
}