From 3a407bb6b73a186eafd99bcec570f88097c4b2e1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 4 Sep 2012 19:11:53 +0300 Subject: Add const to more classes. --- src/textparticle.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/textparticle.cpp') 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(mPos.x) + offsetX; - int screenY = static_cast(mPos.y) - static_cast(mPos.z) + const int screenX = static_cast(mPos.x) + offsetX; + const int screenY = static_cast(mPos.y) - static_cast(mPos.z) + offsetY; float alpha = mAlpha * 255.0f; @@ -62,7 +62,7 @@ bool TextParticle::draw(Graphics *graphics, int offsetX, int offsetY) const / static_cast(mFadeIn); } - gcn::Color color = *mColor; + const gcn::Color color = *mColor; // color.a = (int)alpha; TextRenderer::renderText(graphics, mText, -- cgit v1.2.3-70-g09d2