diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-27 18:37:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-27 18:37:26 +0300 |
commit | 12f2ce912aa1a7e158f06aa20396f213abdd2583 (patch) | |
tree | cd75248717e990fee8b7418df35eb5d27c195336 /src/particle/textparticle.h | |
parent | 3605741892b995144111d4d885cf88063c3f4379 (diff) | |
download | ManaVerse-12f2ce912aa1a7e158f06aa20396f213abdd2583.tar.gz ManaVerse-12f2ce912aa1a7e158f06aa20396f213abdd2583.tar.bz2 ManaVerse-12f2ce912aa1a7e158f06aa20396f213abdd2583.tar.xz ManaVerse-12f2ce912aa1a7e158f06aa20396f213abdd2583.zip |
Add restrict keyword to particle.
Diffstat (limited to 'src/particle/textparticle.h')
-rw-r--r-- | src/particle/textparticle.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/particle/textparticle.h b/src/particle/textparticle.h index 6858ee6a1..d80a7eb24 100644 --- a/src/particle/textparticle.h +++ b/src/particle/textparticle.h @@ -32,30 +32,32 @@ class TextParticle final : public Particle * Constructor. */ TextParticle(const std::string &text, - const Color *const color, - Font *const font, const bool outline = false); + const Color *restrict const color, + Font *restrict const font, + const bool outline = false); A_DELETE_COPY(TextParticle) /** * Draws the particle image. */ - void draw(Graphics *const graphics, + void draw(Graphics *restrict const graphics, const int offsetX, - const int offsetY) const override final A_NONNULL(2); + const int offsetY) const + restrict2 override final A_NONNULL(2); // hack to improve text visibility - int getPixelY() const override final A_WARN_UNUSED + int getPixelY() const restrict2 override final A_WARN_UNUSED { return static_cast<int>(mPos.y + mPos.z); } // hack to improve text visibility (for sorting only) - int getSortPixelY() const override final A_WARN_UNUSED + int getSortPixelY() const restrict2 override final A_WARN_UNUSED { return static_cast<int>(mPos.y + mPos.z); } private: std::string mText; /**< Text of the particle. */ - Font *mTextFont; /**< Font used for drawing the text. */ - const Color *mColor; /**< Color used for drawing the text. */ + Font *restrict mTextFont; /**< Font used for drawing the text. */ + const Color *restrict mColor; /**< Color used for drawing the text. */ int mTextWidth; bool mOutline; /**< Make the text better readable */ }; |