From ca9fac131283ed536971799bef0d1fff4ef8adc1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 15 Feb 2014 22:21:02 +0300 Subject: Remove useless graphics casts. --- src/gui/widgets/extendedlistbox.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/gui/widgets/extendedlistbox.cpp') 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( mListModel); - Graphics *const g = static_cast(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) { -- cgit v1.2.3-60-g2f50