From 8ae877cf5d4abd2c97d299c5067c6d2f77dd2811 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 16 Mar 2016 15:02:46 +0300 Subject: Add nonnull attributes to particle classes. --- src/particle/textparticle.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/particle/textparticle.h') diff --git a/src/particle/textparticle.h b/src/particle/textparticle.h index 7064a5358..e13b2e13c 100644 --- a/src/particle/textparticle.h +++ b/src/particle/textparticle.h @@ -34,7 +34,7 @@ class TextParticle final : public Particle TextParticle(const std::string &text, const Color *restrict const color, Font *restrict const font, - const bool outline = false); + const bool outline = false) A_NONNULL(3, 4); A_DELETE_COPY(TextParticle) @@ -55,11 +55,15 @@ class TextParticle final : public Particle { return CAST_S32(mPos.y + mPos.z); } private: - std::string mText; /**< Text of the particle. */ - Font *restrict mTextFont; /**< Font used for drawing the text. */ - const Color *restrict mColor; /**< Color used for drawing the text. */ + /**< Text of the particle. */ + std::string mText; + /**< Font used for drawing the text. */ + Font *restrict mTextFont A_NONNULLPOINTER; + /**< Color used for drawing the text. */ + const Color *restrict mColor A_NONNULLPOINTER; int mTextWidth; - bool mOutline; /**< Make the text better readable */ + /**< Make the text better readable */ + bool mOutline; }; #endif // PARTICLE_TEXTPARTICLE_H -- cgit v1.2.3-60-g2f50