summaryrefslogtreecommitdiff
path: root/src/textparticle.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-04 19:11:53 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-04 19:11:53 +0300
commit3a407bb6b73a186eafd99bcec570f88097c4b2e1 (patch)
treeea57a752c348ba0a883294855ad3c62c16e9749d /src/textparticle.cpp
parent872fc368f7b253f26714fc47323064f270b62b40 (diff)
downloadplus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.gz
plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.bz2
plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.xz
plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.zip
Add const to more classes.
Diffstat (limited to 'src/textparticle.cpp')
-rw-r--r--src/textparticle.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/textparticle.cpp b/src/textparticle.cpp
index d8c0b7a8e..4ee261f82 100644
--- a/src/textparticle.cpp
+++ b/src/textparticle.cpp
@@ -28,9 +28,9 @@
#include "debug.h"
-TextParticle::TextParticle(Map *map, const std::string &text,
- const gcn::Color *color,
- gcn::Font *font, bool outline):
+TextParticle::TextParticle(Map *const map, const std::string &text,
+ const gcn::Color *const color,
+ gcn::Font *const font, const bool outline) :
Particle(map),
mText(text),
mTextFont(font),
@@ -44,8 +44,8 @@ bool TextParticle::draw(Graphics *graphics, int offsetX, int offsetY) const
if (!isAlive())
return false;
- int screenX = static_cast<int>(mPos.x) + offsetX;
- int screenY = static_cast<int>(mPos.y) - static_cast<int>(mPos.z)
+ const int screenX = static_cast<int>(mPos.x) + offsetX;
+ const int screenY = static_cast<int>(mPos.y) - static_cast<int>(mPos.z)
+ offsetY;
float alpha = mAlpha * 255.0f;
@@ -62,7 +62,7 @@ bool TextParticle::draw(Graphics *graphics, int offsetX, int offsetY) const
/ static_cast<float>(mFadeIn);
}
- gcn::Color color = *mColor;
+ const gcn::Color color = *mColor;
// color.a = (int)alpha;
TextRenderer::renderText(graphics, mText,