summaryrefslogtreecommitdiff
path: root/src/gui/widgets/extendedlistbox.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/extendedlistbox.cpp
parent29f929794c7519b049de0be3af635f05d7e83be6 (diff)
downloadManaVerse-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.gz
ManaVerse-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.bz2
ManaVerse-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.xz
ManaVerse-ca9fac131283ed536971799bef0d1fff4ef8adc1.zip
Remove useless graphics casts.
Diffstat (limited to 'src/gui/widgets/extendedlistbox.cpp')
-rw-r--r--src/gui/widgets/extendedlistbox.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp
index 66065295c..f06e89e55 100644
--- a/src/gui/widgets/extendedlistbox.cpp
+++ b/src/gui/widgets/extendedlistbox.cpp
@@ -56,7 +56,6 @@ void ExtendedListBox::draw(Graphics *graphics)
BLOCK_START("ExtendedListBox::draw")
ExtendedListModel *const model = static_cast<ExtendedListModel* const>(
mListModel);
- Graphics *const g = static_cast<Graphics *const>(graphics);
updateAlpha();
gcn::Font *const font = getFont();
@@ -147,13 +146,14 @@ void ExtendedListBox::draw(Graphics *graphics)
const Image *const image = model->getImageAt(row1);
if (image)
{
- g->drawImage2(image, mImagePadding, item.y + (height
- - image->getHeight()) / 2 + mPadding);
+ graphics->drawImage2(image,
+ mImagePadding,
+ item.y + (height - image->getHeight()) / 2 + mPadding);
}
}
}
- g->setColorAll(mForegroundColor, mForegroundColor2);
+ graphics->setColorAll(mForegroundColor, mForegroundColor2);
for (int f = 0; f < itemsSz; ++f)
{
@@ -181,13 +181,14 @@ void ExtendedListBox::draw(Graphics *graphics)
const Image *const image = model->getImageAt(row1);
if (image)
{
- g->drawImage2(image, mImagePadding, item.y + (height
- - image->getHeight()) / 2 + mPadding);
+ graphics->drawImage2(image,
+ mImagePadding,
+ item.y + (height - image->getHeight()) / 2 + mPadding);
}
}
}
- g->setColorAll(mForegroundSelectedColor, mForegroundSelectedColor2);
+ graphics->setColorAll(mForegroundSelectedColor, mForegroundSelectedColor2);
for (int f = 0; f < selSz; ++f)
{