summaryrefslogtreecommitdiff
path: root/src/maplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-25 02:26:34 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-25 02:26:34 +0300
commitc9f43996f3147100627ee2c6f9da993ceb160113 (patch)
tree7577f02f4658b19e05d586f66b67a9a4f5fedb7e /src/maplayer.cpp
parent8e19f9b9d792cf4d3d3b022fd26a258c3d3d97bf (diff)
downloadmv-c9f43996f3147100627ee2c6f9da993ceb160113.tar.gz
mv-c9f43996f3147100627ee2c6f9da993ceb160113.tar.bz2
mv-c9f43996f3147100627ee2c6f9da993ceb160113.tar.xz
mv-c9f43996f3147100627ee2c6f9da993ceb160113.zip
Improve iterators part 2.
Diffstat (limited to 'src/maplayer.cpp')
-rw-r--r--src/maplayer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/maplayer.cpp b/src/maplayer.cpp
index 010906920..28976e099 100644
--- a/src/maplayer.cpp
+++ b/src/maplayer.cpp
@@ -334,7 +334,8 @@ void MapLayer::drawFringe(Graphics *graphics, int startX, int startY,
if (endY > mHeight)
endY = mHeight;
- Actors::const_iterator ai = actors->begin();
+ ActorsCIter ai = actors->begin();
+ ActorsCIter ai_end = actors->end();
const int dx = (mX * 32) - scrollX;
const int dy = (mY * 32) - scrollY + 32;
@@ -350,7 +351,7 @@ void MapLayer::drawFringe(Graphics *graphics, int startX, int startY,
// If drawing the fringe layer, make sure all actors above this row of
// tiles have been drawn
- while (ai != actors->end() && (*ai)->getPixelY() <= y32s)
+ while (ai != ai_end && (*ai)->getPixelY() <= y32s)
{
(*ai)->draw(graphics, -scrollX, -scrollY);
++ ai;
@@ -453,7 +454,7 @@ void MapLayer::drawFringe(Graphics *graphics, int startX, int startY,
// Draw any remaining actors
if (debugFlags != Map::MAP_SPECIAL3)
{
- while (ai != actors->end())
+ while (ai != ai_end)
{
(*ai)->draw(graphics, -scrollX, -scrollY);
++ai;