diff options
Diffstat (limited to 'src/animatedsprite.cpp')
-rw-r--r-- | src/animatedsprite.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp index dd43e0f1..34ea60f4 100644 --- a/src/animatedsprite.cpp +++ b/src/animatedsprite.cpp @@ -195,23 +195,11 @@ AnimatedSprite::setDirection(SpriteDirection direction) int AnimatedSprite::getWidth() const { - if (mFrame) - { - return mFrame->image->getWidth(); - } - else { - return 0; - } + return mframe ? mFrame->image->getWidth() : 0; } int AnimatedSprite::getHeight() const { - if (mFrame) - { - return mFrame->image->getHeight(); - } - else { - return 0; - } + return mFrame ? mFrame->image->getHeight() : 0; } |