summaryrefslogtreecommitdiff
path: root/src/gui/widgets/dropdown.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/dropdown.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/dropdown.cpp')
-rw-r--r--src/gui/widgets/dropdown.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 354c88423..7aa53e83f 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -235,8 +235,7 @@ void DropDown::draw(Graphics* graphics)
if (model && mPopup->getSelected() >= 0)
{
gcn::Font *const font = getFont();
- static_cast<Graphics *const>(graphics)->setColorAll(
- mForegroundColor, mForegroundColor2);
+ graphics->setColorAll(mForegroundColor, mForegroundColor2);
if (mExtended)
{
const int sel = mPopup->getSelected();
@@ -250,9 +249,9 @@ void DropDown::draw(Graphics* graphics)
}
else
{
- static_cast<Graphics*>(graphics)->drawImage2(
- image, mImagePadding, (mDimension.height
- - image->getHeight()) / 2 + mPadding);
+ graphics->drawImage2(image,
+ mImagePadding,
+ (mDimension.height - image->getHeight()) / 2 + mPadding);
font->drawString(graphics, model->getElementAt(sel),
image->getWidth() + mImagePadding + mSpacing, mPadding);
}
@@ -291,8 +290,9 @@ void DropDown::drawFrame(Graphics *graphics)
BLOCK_START("DropDown::drawFrame")
const int bs2 = getFrameSize();
const gcn::Rectangle &rect = mDimension;
- static_cast<Graphics*>(graphics)->drawImageRect(
- 0, 0, rect.width + bs2, rect.height + bs2, skinRect);
+ graphics->drawImageRect(0, 0,
+ rect.width + bs2, rect.height + bs2,
+ skinRect);
BLOCK_END("DropDown::drawFrame")
}
@@ -303,7 +303,7 @@ void DropDown::drawButton(Graphics *graphics)
Image *image = buttons[mDroppedDown][mPushed];
if (image)
{
- static_cast<Graphics*>(graphics)->drawImage2(image,
+ graphics->drawImage2(image,
mDimension.width - image->getWidth() - mImagePadding,
(height - image->getHeight()) / 2);
}