From 5f97d3fd31bb5a17037610342ea09c21da9c47d3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 25 Aug 2012 12:55:31 +0300 Subject: change vars and methods to const. --- src/animatedsprite.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/animatedsprite.h') diff --git a/src/animatedsprite.h b/src/animatedsprite.h index 4f4caff16..583d5c034 100644 --- a/src/animatedsprite.h +++ b/src/animatedsprite.h @@ -42,7 +42,7 @@ class AnimatedSprite : public Sprite * Constructor. * @param sprite the sprite to animate */ - AnimatedSprite(SpriteDef *sprite); + AnimatedSprite(SpriteDef *const sprite); /** * An helper function, which will request the sprite to animate @@ -55,7 +55,7 @@ class AnimatedSprite : public Sprite int variant = 0); static AnimatedSprite *delayedLoad(const std::string &filename, - int variant = 0); + const int variant = 0); virtual ~AnimatedSprite(); @@ -92,16 +92,16 @@ class AnimatedSprite : public Sprite void clearDelayLoad(); - void setSprite(SpriteDef *sprite) + void setSprite(SpriteDef *const sprite) { mSprite = sprite; } - static void setEnableCache(bool b) + static void setEnableCache(const bool b) { mEnableCache = b; } private: bool updateCurrentAnimation(unsigned int dt); - void setDelayLoad(const std::string &filename, int variant); + void setDelayLoad(const std::string &filename, const int variant); SpriteDirection mDirection; /**< The sprite direction. */ int mLastTime; /**< The last time update was called. */ -- cgit v1.2.3-60-g2f50