diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-15 22:21:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-15 22:21:02 +0300 |
commit | ca9fac131283ed536971799bef0d1fff4ef8adc1 (patch) | |
tree | ec70584d20b117c5d2446ef42b898eeacdda9d12 /src/gui/widgets/extendedlistbox.cpp | |
parent | 29f929794c7519b049de0be3af635f05d7e83be6 (diff) | |
download | manaplus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.gz manaplus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.bz2 manaplus-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.xz manaplus-ca9fac131283ed536971799bef0d1fff4ef8adc1.zip |
Remove useless graphics casts.
Diffstat (limited to 'src/gui/widgets/extendedlistbox.cpp')
-rw-r--r-- | src/gui/widgets/extendedlistbox.cpp | 15 |
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) { |