summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-23 02:46:01 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-23 02:48:43 +0300
commita69a87c5a81ddbf25a25c5549259da550d207bda (patch)
tree59f1a919b327912395ab84bab1684118bf0379be /src/map.cpp
parente646f2fae3f323b7faa26aa9540524d1765211ee (diff)
downloadplus-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.gz
plus-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.bz2
plus-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.xz
plus-a69a87c5a81ddbf25a25c5549259da550d207bda.zip
Improve a bit iterators again.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/map.cpp b/src/map.cpp
index bb35a53f1..0530b2702 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -662,8 +662,8 @@ bool Map::getWalk(int x, int y, unsigned char walkmask) const
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 (ActorSpritesConstIterator it = actors.begin(), it_end = actors.end();
+ it != it_end; ++it)
{
const ActorSprite *actor = *it;
@@ -1259,11 +1259,8 @@ void Map::updatePortalTile(const std::string &name, int type,
MapItem *Map::findPortalXY(int x, int y)
{
- std::vector<MapItem*>::const_iterator it;
- std::vector<MapItem*>::const_iterator it_end;
-
- for (it = mMapPortals.begin(), it_end = mMapPortals.end();
- it != it_end; ++it)
+ for (std::vector<MapItem*>::const_iterator it = mMapPortals.begin(),
+ it_end = mMapPortals.end(); it != it_end; ++it)
{
if (!*it)
continue;