diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-30 23:14:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-07-01 02:08:53 +0300 |
commit | 32014de9008efe051a1a8b05e5e976a4629b34d2 (patch) | |
tree | 694b93739685b8b8462c7f602b8ae693be5e65bf /src/map.cpp | |
parent | 5c260f683e26529d7cf02c12c1fff70a7a7e5eb8 (diff) | |
download | mv-32014de9008efe051a1a8b05e5e976a4629b34d2.tar.gz mv-32014de9008efe051a1a8b05e5e976a4629b34d2.tar.bz2 mv-32014de9008efe051a1a8b05e5e976a4629b34d2.tar.xz mv-32014de9008efe051a1a8b05e5e976a4629b34d2.zip |
Replace some lists to vectors.
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map.cpp b/src/map.cpp index 66c2315ee..01a003f09 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -103,7 +103,7 @@ void TileAnimation::update(int ticks) Image *img = mAnimation->getCurrentImage(); if (img != mLastImage) { - for (std::list<std::pair<MapLayer*, int> >::iterator i = + for (std::vector<std::pair<MapLayer*, int> >::iterator i = mAffected.begin(); i != mAffected.end(); ++i) { i->first->setTile(i->second, img); @@ -767,7 +767,7 @@ void Map::updateAmbientLayers(float scrollX, float scrollY) float dy = scrollY - mLastScrollY; int timePassed = get_elapsed_time(lastTick); - std::list<AmbientLayer*>::iterator i; + std::vector<AmbientLayer*>::iterator i; for (i = mBackgrounds.begin(); i != mBackgrounds.end(); ++i) (*i)->update(timePassed, dx, dy); @@ -787,7 +787,7 @@ void Map::drawAmbientLayers(Graphics *graphics, LayerType type, return; // find out which layer list to draw - std::list<AmbientLayer*> *layers; + std::vector<AmbientLayer*> *layers; switch (type) { case FOREGROUND_LAYERS: @@ -804,7 +804,7 @@ void Map::drawAmbientLayers(Graphics *graphics, LayerType type, } // Draw overlays - for (std::list<AmbientLayer*>::iterator i = layers->begin(); + for (std::vector<AmbientLayer*>::iterator i = layers->begin(); i != layers->end(); ++i) { (*i)->draw(graphics, graphics->getWidth(), graphics->getHeight()); @@ -1464,8 +1464,8 @@ void Map::updatePortalTile(const std::string &name, int type, MapItem *Map::findPortalXY(int x, int y) { - std::list<MapItem*>::iterator it; - std::list<MapItem*>::iterator it_end; + std::vector<MapItem*>::iterator it; + std::vector<MapItem*>::iterator it_end; for (it = mMapPortals.begin(), it_end = mMapPortals.end(); it != it_end; ++it) @@ -1528,7 +1528,7 @@ std::string Map::getObjectData(unsigned x, unsigned y, int type) if (!list) return ""; - std::list<MapObject>::iterator it = list->objects.begin(); + std::vector<MapObject>::iterator it = list->objects.begin(); while (it != list->objects.end()) { if ((*it).type == type) |