diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-01-15 01:07:47 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-01-15 02:05:50 +0200 |
commit | e2150d04662a4ba8b5304dabcc74be0bacded5b7 (patch) | |
tree | cbeb05c2f056a7d5ac4a08e7b80799b5cfd4785b /src/compoundsprite.cpp | |
parent | edda37acb9d66f2751ef712c83dced62428fa685 (diff) | |
download | mv-e2150d04662a4ba8b5304dabcc74be0bacded5b7.tar.gz mv-e2150d04662a4ba8b5304dabcc74be0bacded5b7.tar.bz2 mv-e2150d04662a4ba8b5304dabcc74be0bacded5b7.tar.xz mv-e2150d04662a4ba8b5304dabcc74be0bacded5b7.zip |
Fix code style, apply some fixes after checking with cppcheck from git.
Diffstat (limited to 'src/compoundsprite.cpp')
-rw-r--r-- | src/compoundsprite.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp index 9bbc328ac..1cd77415b 100644 --- a/src/compoundsprite.cpp +++ b/src/compoundsprite.cpp @@ -49,7 +49,7 @@ CompoundSprite::CompoundSprite(): CompoundSprite::~CompoundSprite() { SpriteIterator it, it_end; - for (it = begin(), it_end = end(); it != it_end; it++) + for (it = begin(), it_end = end(); it != it_end; ++it) delete (*it); clear(); @@ -65,7 +65,7 @@ bool CompoundSprite::reset() bool ret = false; SpriteIterator it, it_end; - for (it = begin(), it_end = end(); it != it_end; it++) + for (it = begin(), it_end = end(); it != it_end; ++it) { if (*it) ret |= (*it)->reset(); @@ -80,7 +80,7 @@ bool CompoundSprite::play(std::string action) bool ret = false; SpriteIterator it, it_end; - for (it = begin(), it_end = end(); it != it_end; it++) + for (it = begin(), it_end = end(); it != it_end; ++it) { if (*it) ret |= (*it)->play(action); @@ -95,7 +95,7 @@ bool CompoundSprite::update(int time) bool ret = false; SpriteIterator it, it_end; - for (it = begin(), it_end = end(); it != it_end; it++) + for (it = begin(), it_end = end(); it != it_end; ++it) { if (*it) ret |= (*it)->update(time); @@ -132,7 +132,7 @@ bool CompoundSprite::draw(Graphics* graphics, int posX, int posY) const void CompoundSprite::drawSprites(Graphics* graphics, int posX, int posY) const { SpriteConstIterator it, it_end; - for (it = begin(), it_end = end(); it != it_end; it++) + for (it = begin(), it_end = end(); it != it_end; ++it) { if (*it) { @@ -146,7 +146,7 @@ void CompoundSprite::drawSpritesSDL(Graphics* graphics, int posX, int posY) const { SpriteConstIterator it, it_end; - for (it = begin(), it_end = end(); it != it_end; it++) + for (it = begin(), it_end = end(); it != it_end; ++it) { if (*it) (*it)->draw(graphics, posX, posY); @@ -158,7 +158,7 @@ int CompoundSprite::getWidth() const Sprite *base = NULL; SpriteConstIterator it, it_end; - for (it = begin(), it_end = end(); it != it_end; it++) + for (it = begin(), it_end = end(); it != it_end; ++it) { if ((base = (*it))) break; @@ -175,7 +175,7 @@ int CompoundSprite::getHeight() const Sprite *base = NULL; SpriteConstIterator it, it_end; - for (it = begin(), it_end = end(); it != it_end; it++) + for (it = begin(), it_end = end(); it != it_end; ++it) { if ((base = (*it))) break; @@ -197,7 +197,7 @@ bool CompoundSprite::setDirection(SpriteDirection direction) bool ret = false; SpriteIterator it, it_end; - for (it = begin(), it_end = end(); it != it_end; it++) + for (it = begin(), it_end = end(); it != it_end; ++it) { if (*it) ret |= (*it)->setDirection(direction); @@ -218,7 +218,7 @@ int CompoundSprite::getNumberOfLayers() const unsigned int CompoundSprite::getCurrentFrame() const { SpriteConstIterator it, it_end; - for (it = begin(), it_end = end(); it != it_end; it++) + for (it = begin(), it_end = end(); it != it_end; ++it) { if (*it) return (*it)->getCurrentFrame(); @@ -230,7 +230,7 @@ unsigned int CompoundSprite::getCurrentFrame() const unsigned int CompoundSprite::getFrameCount() const { SpriteConstIterator it, it_end; - for (it = begin(), it_end = end(); it != it_end; it++) + for (it = begin(), it_end = end(); it != it_end; ++it) { if (*it) return (*it)->getFrameCount(); @@ -379,7 +379,7 @@ void CompoundSprite::redraw() const /* SpriteConstIterator it, it_end; - for (it = begin(), it_end = end(); it != it_end; it++) + for (it = begin(), it_end = end(); it != it_end; ++it) { if (*it) (*it)->draw(graphics, posX, posY); |