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/map.cpp | |
parent | edda37acb9d66f2751ef712c83dced62428fa685 (diff) | |
download | manaplus-e2150d04662a4ba8b5304dabcc74be0bacded5b7.tar.gz manaplus-e2150d04662a4ba8b5304dabcc74be0bacded5b7.tar.bz2 manaplus-e2150d04662a4ba8b5304dabcc74be0bacded5b7.tar.xz manaplus-e2150d04662a4ba8b5304dabcc74be0bacded5b7.zip |
Fix code style, apply some fixes after checking with cppcheck from git.
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map.cpp b/src/map.cpp index 5dd933f0b..41ad1b960 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -100,7 +100,7 @@ void TileAnimation::update(int ticks) if (img != mLastImage) { for (std::list<std::pair<MapLayer*, int> >::iterator i = - mAffected.begin(); i != mAffected.end(); i++) + mAffected.begin(); i != mAffected.end(); ++i) { i->first->setTile(i->second, img); } @@ -200,7 +200,7 @@ void MapLayer::draw(Graphics *graphics, int startX, int startY, while (ai != actors.end() && (*ai)->getPixelY() <= y32) { (*ai)->draw(graphics, -scrollX, -scrollY); - ai++; + ++ai; } } @@ -302,7 +302,7 @@ void MapLayer::draw(Graphics *graphics, int startX, int startY, while (ai != actors.end()) { (*ai)->draw(graphics, -scrollX, -scrollY); - ai++; + ++ai; } if (mHighlightAttackRange && player_node) { @@ -608,7 +608,7 @@ void Map::draw(Graphics *graphics, int scrollX, int scrollY) || actor->getTileX() > endX || actor->getTileY() < startY || actor->getTileY() > endY)) { - ai++; + ++ai; continue; } // For now, just draw actors with only one layer. @@ -619,7 +619,7 @@ void Map::draw(Graphics *graphics, int scrollX, int scrollY) actor->setAlpha(1.0f); } } - ai++; + ++ai; } } @@ -754,7 +754,7 @@ Tileset *Map::getTilesetWithGid(int gid) const Tileset *s = NULL; for (Tilesets::const_iterator it = mTilesets.begin(), it_end = mTilesets.end(); it < it_end && (*it)->getFirstGid() <= gid; - it++) + ++it) { s = *it; } @@ -803,7 +803,7 @@ bool Map::occupied(int x, int y) const { const ActorSprites &actors = actorSpriteManager->getAll(); ActorSpritesConstIterator it, it_end; - for (it = actors.begin(), it_end = actors.end(); it != it_end; it++) + for (it = actors.begin(), it_end = actors.end(); it != it_end; ++it) { const ActorSprite *actor = *it; |