diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-25 02:26:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-25 02:26:34 +0300 |
commit | c9f43996f3147100627ee2c6f9da993ceb160113 (patch) | |
tree | 7577f02f4658b19e05d586f66b67a9a4f5fedb7e /src/maplayer.cpp | |
parent | 8e19f9b9d792cf4d3d3b022fd26a258c3d3d97bf (diff) | |
download | plus-c9f43996f3147100627ee2c6f9da993ceb160113.tar.gz plus-c9f43996f3147100627ee2c6f9da993ceb160113.tar.bz2 plus-c9f43996f3147100627ee2c6f9da993ceb160113.tar.xz plus-c9f43996f3147100627ee2c6f9da993ceb160113.zip |
Improve iterators part 2.
Diffstat (limited to 'src/maplayer.cpp')
-rw-r--r-- | src/maplayer.cpp | 7 |
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; |