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/gui.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/gui/gui.cpp') diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 00a3da25e..4da397a73 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -499,13 +499,12 @@ void Gui::draw() if ((client->getMouseFocused() || button & SDL_BUTTON(1)) && mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0F) { - Graphics *g2 = static_cast(mGraphics); const Image *const image = dragDrop.getItemImage(); if (image) { const int posX = mouseX - (image->mBounds.w / 2); const int posY = mouseY - (image->mBounds.h / 2); - g2->drawImage2(image, posX, posY); + mGraphics->drawImage2(image, posX, posY); } if (mGuiFont) { @@ -514,8 +513,8 @@ void Gui::draw() { const int posX = mouseX - mGuiFont->getWidth(str) / 2; const int posY = mouseY + (image ? image->mBounds.h / 2 : 0); - g2->setColorAll(mForegroundColor, mForegroundColor2); - mGuiFont->drawString(g2, str, posX, posY); + mGraphics->setColorAll(mForegroundColor, mForegroundColor2); + mGuiFont->drawString(mGraphics, str, posX, posY); } } @@ -523,7 +522,7 @@ void Gui::draw() if (mouseCursor) { mouseCursor->setAlpha(mMouseCursorAlpha); - g2->drawImage2(mouseCursor, mouseX - 15, mouseY - 17); + mGraphics->drawImage2(mouseCursor, mouseX - 15, mouseY - 17); } } -- cgit v1.2.3-70-g09d2