summaryrefslogtreecommitdiff
path: root/src/particle/textparticle.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-27 18:37:26 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-27 18:37:26 +0300
commit12f2ce912aa1a7e158f06aa20396f213abdd2583 (patch)
treecd75248717e990fee8b7418df35eb5d27c195336 /src/particle/textparticle.cpp
parent3605741892b995144111d4d885cf88063c3f4379 (diff)
downloadmv-12f2ce912aa1a7e158f06aa20396f213abdd2583.tar.gz
mv-12f2ce912aa1a7e158f06aa20396f213abdd2583.tar.bz2
mv-12f2ce912aa1a7e158f06aa20396f213abdd2583.tar.xz
mv-12f2ce912aa1a7e158f06aa20396f213abdd2583.zip
Add restrict keyword to particle.
Diffstat (limited to 'src/particle/textparticle.cpp')
-rw-r--r--src/particle/textparticle.cpp14
1 files changed, 8 insertions, 6 deletions
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<int>(alpha));
mTextFont->drawString(graphics,
color, color2,