diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-11 18:09:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-11 18:09:33 +0300 |
commit | 17dcb835103ac05012c5a7eafa8c7702cef53390 (patch) | |
tree | 422c28adfba13f2161fcfc36943a3903e531490b /src/compoundsprite.cpp | |
parent | 84d53b7bb98bb44696ed1bc2c3f132e51394ac00 (diff) | |
download | mv-17dcb835103ac05012c5a7eafa8c7702cef53390.tar.gz mv-17dcb835103ac05012c5a7eafa8c7702cef53390.tar.bz2 mv-17dcb835103ac05012c5a7eafa8c7702cef53390.tar.xz mv-17dcb835103ac05012c5a7eafa8c7702cef53390.zip |
Add some fixes after automatic checks.
Diffstat (limited to 'src/compoundsprite.cpp')
-rw-r--r-- | src/compoundsprite.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp index 7f7e554a9..45c047060 100644 --- a/src/compoundsprite.cpp +++ b/src/compoundsprite.cpp @@ -158,15 +158,11 @@ void CompoundSprite::drawSpritesSDL(Graphics *const graphics, int CompoundSprite::getWidth() const { - const Sprite *base = nullptr; - FOR_EACH (SpriteConstIterator, it, mSprites) { - if ((base = *it)) - { - if (base) - return base->getWidth(); - } + const Sprite *const base = *it; + if (base) + return base->getWidth(); } return 0; @@ -174,15 +170,11 @@ int CompoundSprite::getWidth() const int CompoundSprite::getHeight() const { - const Sprite *base = nullptr; - FOR_EACH (SpriteConstIterator, it, mSprites) { - if ((base = *it)) - { - if (base) - return base->getHeight(); - } + const Sprite *const base = nullptr; + if (base) + return base->getHeight(); } return 0; |