summaryrefslogtreecommitdiff
path: root/src/gui/widgets/emoteshortcutcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-30 02:10:59 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-30 02:10:59 +0300
commit46f0755975033f37eaae9db73c0e2b6499c2a923 (patch)
tree5c13c361ce4a4e4fd0e07fca1953c54637965666 /src/gui/widgets/emoteshortcutcontainer.cpp
parent1feb7f7edc5f8f383e594b256ef4cab0fae75b99 (diff)
downloadmanaplus-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.gz
manaplus-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.bz2
manaplus-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.xz
manaplus-46f0755975033f37eaae9db73c0e2b6499c2a923.zip
Add const to more classes.
Diffstat (limited to 'src/gui/widgets/emoteshortcutcontainer.cpp')
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp
index cfbfad31d..905a3229b 100644
--- a/src/gui/widgets/emoteshortcutcontainer.cpp
+++ b/src/gui/widgets/emoteshortcutcontainer.cpp
@@ -63,7 +63,7 @@ EmoteShortcutContainer::EmoteShortcutContainer():
// Setup emote sprites
for (int i = 0; i <= EmoteDB::getLast(); i++)
{
- const EmoteSprite* sprite = EmoteDB::getSprite(i, true);
+ const EmoteSprite *const sprite = EmoteDB::getSprite(i, true);
if (sprite && sprite->sprite)
mEmoteImg.push_back(sprite);
}
@@ -104,7 +104,7 @@ void EmoteShortcutContainer::draw(gcn::Graphics *graphics)
if (Client::getGuiAlpha() != mAlpha && mBackgroundImg)
mBackgroundImg->setAlpha(mAlpha);
- Graphics *g = static_cast<Graphics*>(graphics);
+ Graphics *const g = static_cast<Graphics *const>(graphics);
graphics->setFont(getFont());
@@ -129,7 +129,7 @@ void EmoteShortcutContainer::draw(gcn::Graphics *graphics)
graphics->setColor(getForegroundColor());
g->drawText(key, emoteX + 2, emoteY + 2, gcn::Graphics::LEFT);
}
- unsigned sz = static_cast<unsigned>(mEmoteImg.size());
+ const unsigned sz = static_cast<unsigned>(mEmoteImg.size());
for (unsigned i = 0; i < mMaxItems; i++)
{
if (i < sz && mEmoteImg[i] && mEmoteImg[i]->sprite)
@@ -143,10 +143,10 @@ void EmoteShortcutContainer::draw(gcn::Graphics *graphics)
&& mEmoteMoved > 0)
{
// Draw the emote image being dragged by the cursor.
- const EmoteSprite* sprite = mEmoteImg[mEmoteMoved - 1];
+ const EmoteSprite *const sprite = mEmoteImg[mEmoteMoved - 1];
if (sprite && sprite->sprite)
{
- const AnimatedSprite *spr = sprite->sprite;
+ const AnimatedSprite *const spr = sprite->sprite;
const int tPosX = mCursorPosX - (spr->getWidth() / 2);
const int tPosY = mCursorPosY - (spr->getHeight() / 2);