diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-04 19:11:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-04 19:11:53 +0300 |
commit | 3a407bb6b73a186eafd99bcec570f88097c4b2e1 (patch) | |
tree | ea57a752c348ba0a883294855ad3c62c16e9749d /src/text.cpp | |
parent | 872fc368f7b253f26714fc47323064f270b62b40 (diff) | |
download | plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.gz plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.bz2 plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.xz plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.zip |
Add const to more classes.
Diffstat (limited to 'src/text.cpp')
-rw-r--r-- | src/text.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/text.cpp b/src/text.cpp index 7af59f47e..29bed5375 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -40,10 +40,10 @@ int Text::mInstances = 0; ImageRect Text::mBubble; -Text::Text(const std::string &text, int x, int y, - gcn::Graphics::Alignment alignment, - const gcn::Color* color, bool isSpeech, - gcn::Font *font) : +Text::Text(const std::string &text, const int x, const int y, + const gcn::Graphics::Alignment alignment, + const gcn::Color* color, const bool isSpeech, + gcn::Font *const font) : mText(text), mColor(color), mIsSpeech(isSpeech) @@ -116,18 +116,18 @@ Text::~Text() } } -void Text::setColor(const gcn::Color *color) +void Text::setColor(const gcn::Color *const color) { mColor = color; } -void Text::adviseXY(int x, int y) +void Text::adviseXY(const int x, const int y) { if (textManager) textManager->moveText(this, x - mXOffset, y); } -void Text::draw(gcn::Graphics *graphics, int xOff, int yOff) +void Text::draw(gcn::Graphics *const graphics, const int xOff, const int yOff) { if (mIsSpeech) { @@ -141,15 +141,16 @@ void Text::draw(gcn::Graphics *graphics, int xOff, int yOff) *mColor, mFont, !mIsSpeech, true); } -FlashText::FlashText(const std::string &text, int x, int y, - gcn::Graphics::Alignment alignment, - const gcn::Color *color, gcn::Font *font) : +FlashText::FlashText(const std::string &text, const int x, const int y, + const gcn::Graphics::Alignment alignment, + const gcn::Color *const color, gcn::Font *const font) : Text(text, x, y, alignment, color, false, font), mTime(0) { } -void FlashText::draw(gcn::Graphics *graphics, int xOff, int yOff) +void FlashText::draw(gcn::Graphics *const graphics, + const int xOff, const int yOff) { if (mTime) { |