diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-05 12:33:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-05 15:48:51 +0300 |
commit | 126b1470842302537b0bc5e4527cf7fd540a9125 (patch) | |
tree | 8d98425338e7a7f01add71d762fba147fc097fc2 /src/animatedsprite.h | |
parent | f6920653c7a958528df248ff61c372a0bd3d4f1d (diff) | |
download | manaplus-126b1470842302537b0bc5e4527cf7fd540a9125.tar.gz manaplus-126b1470842302537b0bc5e4527cf7fd540a9125.tar.bz2 manaplus-126b1470842302537b0bc5e4527cf7fd540a9125.tar.xz manaplus-126b1470842302537b0bc5e4527cf7fd540a9125.zip |
Add checks and const to animatedsprites and related classes.
Diffstat (limited to 'src/animatedsprite.h')
-rw-r--r-- | src/animatedsprite.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/animatedsprite.h b/src/animatedsprite.h index c10e655d1..a58098245 100644 --- a/src/animatedsprite.h +++ b/src/animatedsprite.h @@ -54,7 +54,7 @@ class AnimatedSprite final : public Sprite * @param variant the sprite variant */ static AnimatedSprite *load(const std::string &filename, - int variant = 0) A_WARN_UNUSED; + const int variant = 0) A_WARN_UNUSED; static AnimatedSprite *delayedLoad(const std::string &filename, const int variant = 0) @@ -62,13 +62,14 @@ class AnimatedSprite final : public Sprite virtual ~AnimatedSprite(); - bool reset(); + bool reset() override; - bool play(std::string action); + bool play(const std::string &action) override; - bool update(int time); + bool update(const int time) override; - bool draw(Graphics* graphics, int posX, int posY) const; + bool draw(Graphics *const graphics, + const int posX, const int posY) const override; int getWidth() const A_WARN_UNUSED; @@ -102,7 +103,7 @@ class AnimatedSprite final : public Sprite { mEnableCache = b; } private: - bool updateCurrentAnimation(unsigned int dt); + bool updateCurrentAnimation(const unsigned int dt); void setDelayLoad(const std::string &filename, const int variant); |