From 311c175f3184103950c72bc5c775174597430b83 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 14 Jul 2017 01:31:22 +0300 Subject: Replace std::vector into macro STD_VECTOR. In most case it equal to std::vector except debug modes. Now it can be also mse::mstd::vector, but sadly this class not support all required features. --- src/resources/map/map.cpp | 8 ++++---- src/resources/map/map.h | 12 ++++++------ src/resources/map/maplayer.h | 2 +- src/resources/map/mapobjectlist.h | 2 +- src/resources/map/maprowvertexes.h | 2 +- src/resources/map/tileanimation.h | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/resources/map') diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 8deea4b23..675c9ca58 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -1105,7 +1105,7 @@ void Map::initializeParticleEffects() const restrict2 if (config.getBoolValue("particleeffects")) { - for (std::vector::const_iterator + for (STD_VECTOR::const_iterator i = mParticleEffects.begin(); i != mParticleEffects.end(); ++i) @@ -1315,7 +1315,7 @@ void Map::updatePortalTile(const std::string &restrict name, MapItem *Map::findPortalXY(const int x, const int y) const restrict2 { - FOR_EACH (std::vector::const_iterator, it, mMapPortals) + FOR_EACH (STD_VECTOR::const_iterator, it, mMapPortals) { if (*it == nullptr) continue; @@ -1378,8 +1378,8 @@ std::string Map::getObjectData(const unsigned x, const unsigned y, if (list == nullptr) return ""; - std::vector::const_iterator it = list->objects.begin(); - const std::vector::const_iterator it_end = list->objects.end(); + STD_VECTOR::const_iterator it = list->objects.begin(); + const STD_VECTOR::const_iterator it_end = list->objects.end(); while (it != it_end) { if ((*it).type == type) diff --git a/src/resources/map/map.h b/src/resources/map/map.h index 8a2051a60..dc05cb2ea 100644 --- a/src/resources/map/map.h +++ b/src/resources/map/map.h @@ -54,11 +54,11 @@ class WalkLayer; struct MetaTile; -typedef std::vector Tilesets; -typedef std::vector Layers; +typedef STD_VECTOR Tilesets; +typedef STD_VECTOR Layers; typedef Layers::const_iterator LayersCIter; -typedef std::vector AmbientLayerVector; +typedef STD_VECTOR AmbientLayerVector; typedef AmbientLayerVector::const_iterator AmbientLayerVectorCIter; typedef AmbientLayerVector::iterator AmbientLayerVectorIter; @@ -264,7 +264,7 @@ class Map final : public Properties, const int x, const int y, const bool addNew = true) restrict2; - const std::vector &getPortals() const restrict2 noexcept2 + const STD_VECTOR &getPortals() const restrict2 noexcept2 A_WARN_UNUSED { return mMapPortals; } @@ -450,9 +450,9 @@ class Map final : public Properties, const2 int w; const2 int h; }; - std::vector mParticleEffects; + STD_VECTOR mParticleEffects; - std::vector mMapPortals; + STD_VECTOR mMapPortals; std::map mTileAnimations; diff --git a/src/resources/map/maplayer.h b/src/resources/map/maplayer.h index f5cf36fa9..c21ac33bc 100644 --- a/src/resources/map/maplayer.h +++ b/src/resources/map/maplayer.h @@ -216,7 +216,7 @@ class MapLayer final: public MemoryCounter, public ConfigListener const SpecialLayer *restrict mSpecialLayer; const SpecialLayer *restrict mTempLayer; const std::string mName; - typedef std::vector MapRows; + typedef STD_VECTOR MapRows; MapRows mTempRows; int mMask; int mTileCondition; diff --git a/src/resources/map/mapobjectlist.h b/src/resources/map/mapobjectlist.h index 139ee08ea..327c9da9e 100644 --- a/src/resources/map/mapobjectlist.h +++ b/src/resources/map/mapobjectlist.h @@ -39,7 +39,7 @@ class MapObjectList final A_DELETE_COPY(MapObjectList) - std::vector objects; + STD_VECTOR objects; }; #endif // RESOURCES_MAP_MAPOBJECTLIST_H diff --git a/src/resources/map/maprowvertexes.h b/src/resources/map/maprowvertexes.h index 9665a5b59..0b64bed57 100644 --- a/src/resources/map/maprowvertexes.h +++ b/src/resources/map/maprowvertexes.h @@ -27,7 +27,7 @@ #include "localconsts.h" -typedef std::vector MapRowImages; +typedef STD_VECTOR MapRowImages; class MapRowVertexes final { diff --git a/src/resources/map/tileanimation.h b/src/resources/map/tileanimation.h index bf4e9f232..a9b5cc281 100644 --- a/src/resources/map/tileanimation.h +++ b/src/resources/map/tileanimation.h @@ -34,7 +34,7 @@ class Image; class MapLayer; class SimpleAnimation; -typedef std::vector > TilePairVector; +typedef STD_VECTOR > TilePairVector; typedef TilePairVector::const_iterator TilePairVectorCIter; /** -- cgit v1.2.3-70-g09d2