From af2677411d895573cf9bc225518d6a1a16079863 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 24 Oct 2013 12:18:21 +0300 Subject: add final keyword to particles files. --- src/particle/animationparticle.h | 2 +- src/particle/imageparticle.h | 5 +++-- src/particle/particle.h | 3 ++- src/particle/particlecontainer.h | 8 ++++---- src/particle/rotationalparticle.h | 2 +- src/particle/textparticle.h | 6 +++--- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/particle/animationparticle.h b/src/particle/animationparticle.h index 55f314994..b2a190e08 100644 --- a/src/particle/animationparticle.h +++ b/src/particle/animationparticle.h @@ -43,7 +43,7 @@ class AnimationParticle final : public ImageParticle ~AnimationParticle(); - bool update() override; + bool update() override final; private: SimpleAnimation *mAnimation; /**< Used animation for this particle */ diff --git a/src/particle/imageparticle.h b/src/particle/imageparticle.h index c05b2316e..daae640ce 100644 --- a/src/particle/imageparticle.h +++ b/src/particle/imageparticle.h @@ -54,9 +54,10 @@ class ImageParticle : public Particle * Draws the particle image */ virtual bool draw(Graphics *const graphics, - const int offsetX, const int offsetY) const override; + const int offsetX, + const int offsetY) const override final; - virtual void setAlpha(const float alpha) override + virtual void setAlpha(const float alpha) override final { mAlpha = alpha; } static std::map imageParticleCountByName; diff --git a/src/particle/particle.h b/src/particle/particle.h index 42dd31e15..f677ee01b 100644 --- a/src/particle/particle.h +++ b/src/particle/particle.h @@ -101,7 +101,8 @@ class Particle : public Actor * Draws the particle image. */ virtual bool draw(Graphics *const graphics, - const int offsetX, const int offsetY) const override; + const int offsetX, + const int offsetY) const override; /** * Necessary for sorting with the other sprites. diff --git a/src/particle/particlecontainer.h b/src/particle/particlecontainer.h index a8921a942..82718d7d1 100644 --- a/src/particle/particlecontainer.h +++ b/src/particle/particlecontainer.h @@ -95,9 +95,9 @@ public: */ void removeLocally(const Particle *const particle); - void clearLocally() override; + void clearLocally() override final; - void moveTo(const float x, const float y) override; + void moveTo(const float x, const float y) override final; protected: std::list mElements; /**< Contained particle effects */ @@ -127,9 +127,9 @@ public: */ void delLocally(const int index); - void clearLocally() override; + void clearLocally() override final; - void moveTo(const float x, const float y) override; + void moveTo(const float x, const float y) override final; protected: std::vector mIndexedElements; diff --git a/src/particle/rotationalparticle.h b/src/particle/rotationalparticle.h index fcc7e4b07..4d7f826de 100644 --- a/src/particle/rotationalparticle.h +++ b/src/particle/rotationalparticle.h @@ -43,7 +43,7 @@ class RotationalParticle final : public ImageParticle ~RotationalParticle(); - bool update() override; + bool update() override final; private: SimpleAnimation *mAnimation; /**< Used animation for this particle */ diff --git a/src/particle/textparticle.h b/src/particle/textparticle.h index 272f1c6e1..7b63ff259 100644 --- a/src/particle/textparticle.h +++ b/src/particle/textparticle.h @@ -41,14 +41,14 @@ class TextParticle final : public Particle * Draws the particle image. */ bool draw(Graphics *const graphics, - const int offsetX, const int offsetY) const override; + const int offsetX, const int offsetY) const override final; // hack to improve text visibility - int getPixelY() const override A_WARN_UNUSED + int getPixelY() const override final A_WARN_UNUSED { return static_cast(mPos.y + mPos.z); } // hack to improve text visibility (for sorting only) - int getSortPixelY() const override A_WARN_UNUSED + int getSortPixelY() const override final A_WARN_UNUSED { return static_cast(mPos.y + mPos.z); } private: -- cgit v1.2.3-70-g09d2