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/textfield.cpp | |
parent | 29f929794c7519b049de0be3af635f05d7e83be6 (diff) | |
download | ManaVerse-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.gz ManaVerse-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.bz2 ManaVerse-ca9fac131283ed536971799bef0d1fff4ef8adc1.tar.xz ManaVerse-ca9fac131283ed536971799bef0d1fff4ef8adc1.zip |
Remove useless graphics casts.
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r-- | src/gui/widgets/textfield.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index b1d188f22..fdcd84089 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -149,8 +149,7 @@ void TextField::draw(Graphics *graphics) font->getWidth(mText.substr(0, mCaretPosition)) - mXScroll); } - static_cast<Graphics*>(graphics)->setColorAll( - mForegroundColor, mForegroundColor2); + graphics->setColorAll(mForegroundColor, mForegroundColor2); font->drawString(graphics, mText, mPadding - mXScroll, mPadding); BLOCK_END("TextField::draw") } @@ -159,8 +158,11 @@ void TextField::drawFrame(Graphics *graphics) { BLOCK_START("TextField::drawFrame") const int bs = 2 * mFrameSize; - static_cast<Graphics*>(graphics)->drawImageRect(0, 0, - mDimension.width + bs, mDimension.height + bs, skin); + graphics->drawImageRect(0, + 0, + mDimension.width + bs, + mDimension.height + bs, + skin); BLOCK_END("TextField::drawFrame") } |