summaryrefslogtreecommitdiff
path: root/src/compoundsprite.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-24 19:17:41 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-02 20:57:16 +0200
commit59919635523d41f3a15120c83db4b7d080c155de (patch)
tree0da989bd2342b5a53d49c26893a3a544e7432fcc /src/compoundsprite.h
parent7ea1c4574d6e845f95f2c4c3a1dd4a5d730bc6ba (diff)
downloadmana-59919635523d41f3a15120c83db4b7d080c155de.tar.gz
mana-59919635523d41f3a15120c83db4b7d080c155de.tar.bz2
mana-59919635523d41f3a15120c83db4b7d080c155de.tar.xz
mana-59919635523d41f3a15120c83db4b7d080c155de.zip
General code cleanups
* Removed some unused includes * Removed unused ListBox::mFont * Removed wrong cast to SDL_Scancode * Removed superfluous .c_str() * Removed superfluous explicit std::string construction * Removed unused variable * Use more emplace_back * Turned FindBeingFunctor into a lambda * Avoid needless pointer references for ambient layers and use a vector
Diffstat (limited to 'src/compoundsprite.h')
-rw-r--r--src/compoundsprite.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/compoundsprite.h b/src/compoundsprite.h
index a309ad3d..7760da8c 100644
--- a/src/compoundsprite.h
+++ b/src/compoundsprite.h
@@ -34,11 +34,11 @@ public:
~CompoundSprite() override;
- bool reset() override;
+ bool reset() final;
- bool play(std::string action) override;
+ bool play(const std::string &action) final;
- bool update(int time) override;
+ bool update(int time) final;
bool draw(Graphics *graphics, int posX, int posY) const override;
@@ -54,21 +54,21 @@ public:
int getHeight() const override
{ return mHeight; }
- int getOffsetX() const override
+ int getOffsetX() const final
{ return mOffsetX; }
- int getOffsetY() const override
+ int getOffsetY() const final
{ return mOffsetY; }
- const Image *getImage() const override;
+ const Image *getImage() const final;
- bool setDirection(SpriteDirection direction) override;
+ bool setDirection(SpriteDirection direction) final;
int getNumberOfLayers() const;
virtual bool drawnWhenBehind() const;
- int getDuration() const override;
+ int getDuration() const final;
size_t size() const
{ return mSprites.size(); }