summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-19 00:27:45 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-19 00:27:45 +0200
commitb2ac4def24379db588ffa52ca63676710f18b4fc (patch)
tree09a76cb672d032cd6b8f41fd3f5afc6c3836839f /src/map.cpp
parentf4792bc06f21335fc2d1171d937ea7645ca0c253 (diff)
downloadplus-b2ac4def24379db588ffa52ca63676710f18b4fc.tar.gz
plus-b2ac4def24379db588ffa52ca63676710f18b4fc.tar.bz2
plus-b2ac4def24379db588ffa52ca63676710f18b4fc.tar.xz
plus-b2ac4def24379db588ffa52ca63676710f18b4fc.zip
Fix code style and add small optimisations.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 9557d7b79..a33a87f67 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -516,7 +516,7 @@ void Map::update(int ticks)
// Update animated tiles
for (std::map<int, TileAnimation*>::iterator
iAni = mTileAnimations.begin();
- iAni != mTileAnimations.end(); iAni++)
+ iAni != mTileAnimations.end(); ++iAni)
{
iAni->second->update(ticks);
}
@@ -704,10 +704,10 @@ void Map::updateAmbientLayers(float scrollX, float scrollY)
int timePassed = get_elapsed_time(lastTick);
std::list<AmbientLayer*>::iterator i;
- for (i = mBackgrounds.begin(); i != mBackgrounds.end(); i++)
+ for (i = mBackgrounds.begin(); i != mBackgrounds.end(); ++i)
(*i)->update(timePassed, dx, dy);
- for (i = mForegrounds.begin(); i != mForegrounds.end(); i++)
+ for (i = mForegrounds.begin(); i != mForegrounds.end(); ++i)
(*i)->update(timePassed, dx, dy);
mLastScrollX = scrollX;
@@ -741,7 +741,7 @@ void Map::drawAmbientLayers(Graphics *graphics, LayerType type,
// Draw overlays
for (std::list<AmbientLayer*>::iterator i = layers->begin();
- i != layers->end(); i++)
+ i != layers->end(); ++i)
{
(*i)->draw(graphics, graphics->getWidth(), graphics->getHeight());
@@ -968,7 +968,7 @@ Path Map::findPixelPath(int startPixelX, int startPixelY, int endPixelX,
it->x * 32 + startOffsetX + static_cast<float>(changeX * i),
it->y * 32 + startOffsetY + static_cast<float>(changeY * i));
i++;
- it++;
+ ++it;
}
// Remove the last path node, as it's more clever to go to the destination.
@@ -1207,7 +1207,7 @@ void Map::initializeParticleEffects(Particle *particleEngine)
{
for (std::list<ParticleEffectData>::iterator
i = particleEffects.begin();
- i != particleEffects.end(); i++)
+ i != particleEffects.end(); ++i)
{
p = particleEngine->addEffect(i->file, i->x, i->y);
if (p && i->w > 0 && i->h > 0)
@@ -1382,7 +1382,7 @@ MapItem *Map::findPortalXY(int x, int y)
std::list<MapItem*>::iterator it_end;
for (it = mMapPortals.begin(), it_end = mMapPortals.end();
- it != it_end; it++)
+ it != it_end; ++it)
{
MapItem *item = *it;
if (item->mX == x && item->mY == y)