diff options
Diffstat (limited to 'src/animatedsprite.cpp')
-rw-r--r-- | src/animatedsprite.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp index 54a11d87..a9138e36 100644 --- a/src/animatedsprite.cpp +++ b/src/animatedsprite.cpp @@ -36,9 +36,9 @@ AnimatedSprite::AnimatedSprite(SpriteDef *sprite): mFrameIndex(0), mFrameTime(0), mSprite(sprite), - mAction(0), - mAnimation(0), - mFrame(0) + mAction(nullptr), + mAnimation(nullptr), + mFrame(nullptr) { assert(mSprite); @@ -56,8 +56,8 @@ AnimatedSprite *AnimatedSprite::load(const std::string &filename, int variant) ResourceManager *resman = ResourceManager::getInstance(); SpriteDef *s = resman->getSprite(filename, variant); if (!s) - return NULL; - AnimatedSprite *as = new AnimatedSprite(s); + return nullptr; + auto *as = new AnimatedSprite(s); s->decRef(); return as; } @@ -145,8 +145,8 @@ bool AnimatedSprite::updateCurrentAnimation(unsigned int time) if (Animation::isTerminator(*mFrame)) { - mAnimation = 0; - mFrame = 0; + mAnimation = nullptr; + mFrame = nullptr; return false; } } @@ -229,5 +229,5 @@ int AnimatedSprite::getOffsetY() const const Image* AnimatedSprite::getImage() const { - return mFrame ? mFrame->image : 0; + return mFrame ? mFrame->image : nullptr; } |