From 12f2ce912aa1a7e158f06aa20396f213abdd2583 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Dec 2015 18:37:26 +0300 Subject: Add restrict keyword to particle. --- src/particle/textparticle.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/particle/textparticle.cpp') diff --git a/src/particle/textparticle.cpp b/src/particle/textparticle.cpp index 33a0c4b0c..c79b94c81 100644 --- a/src/particle/textparticle.cpp +++ b/src/particle/textparticle.cpp @@ -28,9 +28,10 @@ #include "debug.h" -TextParticle::TextParticle(const std::string &text, - const Color *const color, - Font *const font, const bool outline) : +TextParticle::TextParticle(const std::string &restrict text, + const Color *restrict const color, + Font *restrict const font, + const bool outline) : Particle(), mText(text), mTextFont(font), @@ -40,8 +41,9 @@ TextParticle::TextParticle(const std::string &text, { } -void TextParticle::draw(Graphics *const graphics, - const int offsetX, const int offsetY) const +void TextParticle::draw(Graphics *restrict const graphics, + const int offsetX, + const int offsetY) const restrict2 { if (!mColor || !mTextFont) return; @@ -77,7 +79,7 @@ void TextParticle::draw(Graphics *const graphics, graphics->setColor(color); if (mOutline) { - const Color &color2 = theme->getColor(ThemeColorId::OUTLINE, + const Color &restrict color2 = theme->getColor(ThemeColorId::OUTLINE, static_cast(alpha)); mTextFont->drawString(graphics, color, color2, -- cgit v1.2.3-70-g09d2