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/desktop.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/gui/widgets/desktop.cpp') diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp index 4a4a73b53..b46fe3289 100644 --- a/src/gui/widgets/desktop.cpp +++ b/src/gui/widgets/desktop.cpp @@ -106,7 +106,6 @@ void Desktop::widgetResized(const gcn::Event &event A_UNUSED) void Desktop::draw(Graphics *graphics) { BLOCK_START("Desktop::draw") - Graphics *const g = static_cast(graphics); const gcn::Rectangle &rect = mDimension; const int width = rect.width; @@ -118,30 +117,30 @@ void Desktop::draw(Graphics *graphics) if (width > wallpWidth || height > wallpHeight) { - g->setColor(mBackgroundGrayColor); - g->fillRectangle(gcn::Rectangle(0, 0, width, height)); + graphics->setColor(mBackgroundGrayColor); + graphics->fillRectangle(gcn::Rectangle(0, 0, width, height)); } if (imageHelper->useOpenGL() == RENDER_SOFTWARE) { - g->drawImage2(mWallpaper, + graphics->drawImage2(mWallpaper, (width - wallpWidth) / 2, (height - wallpHeight) / 2); } else { - g->drawRescaledImage(mWallpaper, 0, 0, width, height); + graphics->drawRescaledImage(mWallpaper, 0, 0, width, height); } } else { - g->setColor(mBackgroundGrayColor); - g->fillRectangle(gcn::Rectangle(0, 0, width, height)); + graphics->setColor(mBackgroundGrayColor); + graphics->fillRectangle(gcn::Rectangle(0, 0, width, height)); } // Draw a thin border under the application version... - g->setColor(mBackgroundColor); - g->fillRectangle(gcn::Rectangle(mVersionLabel->getDimension())); + graphics->setColor(mBackgroundColor); + graphics->fillRectangle(gcn::Rectangle(mVersionLabel->getDimension())); Container::draw(graphics); BLOCK_END("Desktop::draw") -- cgit v1.2.3-70-g09d2