From c9f43996f3147100627ee2c6f9da993ceb160113 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Apr 2012 02:26:34 +0300 Subject: Improve iterators part 2. --- src/maplayer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/maplayer.cpp') 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; -- cgit v1.2.3-60-g2f50