diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-30 22:53:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-30 22:53:27 +0300 |
commit | 5cbd0d2cb7086fda592c00dbc3b07d06af95f080 (patch) | |
tree | d36b4ac344f31f34311c7cb7a9a637ed48356e3e /src/gui/widgets/textpreview.cpp | |
parent | 4210163dae7d6266923ab11f78b631173c9533e3 (diff) | |
download | manaverse-5cbd0d2cb7086fda592c00dbc3b07d06af95f080.tar.gz manaverse-5cbd0d2cb7086fda592c00dbc3b07d06af95f080.tar.bz2 manaverse-5cbd0d2cb7086fda592c00dbc3b07d06af95f080.tar.xz manaverse-5cbd0d2cb7086fda592c00dbc3b07d06af95f080.zip |
Add const to more classes.
Diffstat (limited to 'src/gui/widgets/textpreview.cpp')
-rw-r--r-- | src/gui/widgets/textpreview.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp index 0ec79a5c5..f78d4a4b7 100644 --- a/src/gui/widgets/textpreview.cpp +++ b/src/gui/widgets/textpreview.cpp @@ -69,9 +69,11 @@ void TextPreview::draw(gcn::Graphics* graphics) if (mTextBGColor && typeid(*mFont) == typeid(SDLFont)) { - SDLFont *font = static_cast<SDLFont*>(mFont); - int x = font->getWidth(mText) + 1 + 2 * ((mOutline || mShadow) ? 1 :0); - int y = font->getHeight() + 1 + 2 * ((mOutline || mShadow) ? 1 : 0); + const SDLFont *const font = static_cast<SDLFont*>(mFont); + const int x = font->getWidth(mText) + 1 + + 2 * ((mOutline || mShadow) ? 1 :0); + const int y = font->getHeight() + 1 + + 2 * ((mOutline || mShadow) ? 1 : 0); graphics->setColor(gcn::Color(static_cast<int>(mTextBGColor->r), static_cast<int>(mTextBGColor->g), static_cast<int>(mTextBGColor->b), |