diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-07-14 01:31:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-07-14 01:31:22 +0300 |
commit | 311c175f3184103950c72bc5c775174597430b83 (patch) | |
tree | ad022dc44a1c4177b3d53bf0d7eaa5a1736c8cf1 /src/resources | |
parent | 16bcb81b0509725e4546bcb3c390ca3c1bb7e7b1 (diff) | |
download | mv-311c175f3184103950c72bc5c775174597430b83.tar.gz mv-311c175f3184103950c72bc5c775174597430b83.tar.bz2 mv-311c175f3184103950c72bc5c775174597430b83.tar.xz mv-311c175f3184103950c72bc5c775174597430b83.zip |
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.
Diffstat (limited to 'src/resources')
46 files changed, 152 insertions, 152 deletions
diff --git a/src/resources/animation/animation.h b/src/resources/animation/animation.h index 4a672aab2..a922f989b 100644 --- a/src/resources/animation/animation.h +++ b/src/resources/animation/animation.h @@ -79,7 +79,7 @@ class Animation final : public MemoryCounter void setLastFrameDelay(const int delay) noexcept2; - typedef std::vector<Frame> Frames; + typedef STD_VECTOR<Frame> Frames; typedef Frames::iterator FramesIter; typedef Frames::const_iterator FramesCIter; typedef Frames::reverse_iterator FramesRevIter; diff --git a/src/resources/atlas/atlasmanager.cpp b/src/resources/atlas/atlasmanager.cpp index c7d237115..888af7fe7 100644 --- a/src/resources/atlas/atlasmanager.cpp +++ b/src/resources/atlas/atlasmanager.cpp @@ -61,8 +61,8 @@ AtlasResource *AtlasManager::loadTextureAtlas(const std::string &name, const StringVect &files) { BLOCK_START("AtlasManager::loadTextureAtlas") - std::vector<TextureAtlas*> atlases; - std::vector<Image*> images; + STD_VECTOR<TextureAtlas*> atlases; + STD_VECTOR<Image*> images; AtlasResource *resource = new AtlasResource; loadImages(files, images); @@ -76,7 +76,7 @@ AtlasResource *AtlasManager::loadTextureAtlas(const std::string &name, // sorting images on atlases. simpleSort(name, atlases, images, maxSize); - FOR_EACH (std::vector<TextureAtlas*>::iterator, it, atlases) + FOR_EACH (STD_VECTOR<TextureAtlas*>::iterator, it, atlases) { TextureAtlas *const atlas = *it; if (atlas == nullptr) @@ -96,8 +96,8 @@ AtlasResource *AtlasManager::loadTextureAtlas(const std::string &name, AtlasResource *AtlasManager::loadEmptyAtlas(const std::string &name, const StringVect &files) { - std::vector<TextureAtlas*> atlases; - std::vector<Image*> images; + STD_VECTOR<TextureAtlas*> atlases; + STD_VECTOR<Image*> images; AtlasResource *resource = new AtlasResource; loadEmptyImages(files, images); @@ -105,7 +105,7 @@ AtlasResource *AtlasManager::loadEmptyAtlas(const std::string &name, // sorting images on atlases. emptySort(name, atlases, images); - FOR_EACH (std::vector<TextureAtlas*>::iterator, it, atlases) + FOR_EACH (STD_VECTOR<TextureAtlas*>::iterator, it, atlases) { TextureAtlas *const atlas = *it; if (atlas == nullptr) @@ -125,7 +125,7 @@ AtlasResource *AtlasManager::loadEmptyAtlas(const std::string &name, } void AtlasManager::loadImages(const StringVect &files, - std::vector<Image*> &images) + STD_VECTOR<Image*> &images) { BLOCK_START("AtlasManager::loadImages") @@ -175,7 +175,7 @@ void AtlasManager::loadImages(const StringVect &files, } void AtlasManager::loadEmptyImages(const StringVect &files, - std::vector<Image*> &images) + STD_VECTOR<Image*> &images) { BLOCK_START("AtlasManager::loadEmptyImages") @@ -202,8 +202,8 @@ void AtlasManager::loadEmptyImages(const StringVect &files, } void AtlasManager::simpleSort(const std::string &restrict name, - std::vector<TextureAtlas*> &restrict atlases, - const std::vector<Image*> &restrict images, + STD_VECTOR<TextureAtlas*> &restrict atlases, + const STD_VECTOR<Image*> &restrict images, int size) { BLOCK_START("AtlasManager::simpleSort") @@ -211,8 +211,8 @@ void AtlasManager::simpleSort(const std::string &restrict name, int y = 0; int tempHeight = 0; TextureAtlas *atlas = new TextureAtlas; - std::vector<Image*>::const_iterator it = images.begin(); - const std::vector<Image*>::const_iterator it_end = images.end(); + STD_VECTOR<Image*>::const_iterator it = images.begin(); + const STD_VECTOR<Image*>::const_iterator it_end = images.end(); for (it = images.begin(); it != it_end; ++ it) { const Image *const img = *it; @@ -273,13 +273,13 @@ void AtlasManager::simpleSort(const std::string &restrict name, } void AtlasManager::emptySort(const std::string &restrict name, - std::vector<TextureAtlas*> &restrict atlases, - const std::vector<Image*> &restrict images) + STD_VECTOR<TextureAtlas*> &restrict atlases, + const STD_VECTOR<Image*> &restrict images) { BLOCK_START("AtlasManager::simpleSort") TextureAtlas *atlas = new TextureAtlas; - std::vector<Image*>::const_iterator it = images.begin(); - const std::vector<Image*>::const_iterator it_end = images.end(); + STD_VECTOR<Image*>::const_iterator it = images.begin(); + const STD_VECTOR<Image*>::const_iterator it_end = images.end(); for (it = images.begin(); it != it_end; ++ it) { const Image *const img = *it; @@ -370,7 +370,7 @@ void AtlasManager::createSDLAtlas(TextureAtlas *const atlas) } // drawing SDL images to surface - FOR_EACH (std::vector<AtlasItem*>::iterator, it, atlas->items) + FOR_EACH (STD_VECTOR<AtlasItem*>::iterator, it, atlas->items) { AtlasItem *const item = *it; imageHelper->copySurfaceToImage(image, item->x, item->y, @@ -424,7 +424,7 @@ void AtlasManager::convertEmptyAtlas(TextureAtlas *const atlas) image->incRef(); - FOR_EACH (std::vector<AtlasItem*>::iterator, it, atlas->items) + FOR_EACH (STD_VECTOR<AtlasItem*>::iterator, it, atlas->items) { AtlasItem *const item = *it; // delete SDL Image @@ -471,7 +471,7 @@ void AtlasManager::convertAtlas(TextureAtlas *const atlas) image->incRef(); - FOR_EACH (std::vector<AtlasItem*>::iterator, it, atlas->items) + FOR_EACH (STD_VECTOR<AtlasItem*>::iterator, it, atlas->items) { AtlasItem *const item = *it; // delete SDL Image @@ -497,7 +497,7 @@ void AtlasManager::injectToResources(const AtlasResource *const resource) { if (resource == nullptr) return; - FOR_EACH (std::vector<TextureAtlas*>::const_iterator, + FOR_EACH (STD_VECTOR<TextureAtlas*>::const_iterator, it, resource->atlases) { // add each atlas image to resources @@ -507,7 +507,7 @@ void AtlasManager::injectToResources(const AtlasResource *const resource) Image *const image = atlas->atlasImage; if (image != nullptr) ResourceManager::addResource(atlas->name, image); - FOR_EACH (std::vector<AtlasItem*>::iterator, it2, atlas->items) + FOR_EACH (STD_VECTOR<AtlasItem*>::iterator, it2, atlas->items) { AtlasItem *const item = *it2; if (item == nullptr) @@ -523,7 +523,7 @@ void AtlasManager::moveToDeleted(AtlasResource *const resource) { if (resource == nullptr) return; - FOR_EACH (std::vector<TextureAtlas*>::iterator, it, resource->atlases) + FOR_EACH (STD_VECTOR<TextureAtlas*>::iterator, it, resource->atlases) { // move each atlas image to deleted TextureAtlas *const atlas = *it; @@ -535,7 +535,7 @@ void AtlasManager::moveToDeleted(AtlasResource *const resource) // move each atlas image to deleted ResourceManager::moveToDeleted(image); } - FOR_EACH (std::vector<AtlasItem*>::iterator, it2, atlas->items) + FOR_EACH (STD_VECTOR<AtlasItem*>::iterator, it2, atlas->items) { AtlasItem *const item = *it2; if (item != nullptr) diff --git a/src/resources/atlas/atlasmanager.h b/src/resources/atlas/atlasmanager.h index 13db9717e..1e5de93b9 100644 --- a/src/resources/atlas/atlasmanager.h +++ b/src/resources/atlas/atlasmanager.h @@ -53,18 +53,18 @@ class AtlasManager final private: static void loadImages(const StringVect &files, - std::vector<Image*> &images); + STD_VECTOR<Image*> &images); static void loadEmptyImages(const StringVect &files, - std::vector<Image*> &images); + STD_VECTOR<Image*> &images); static void emptySort(const std::string &restrict name, - std::vector<TextureAtlas*> &restrict atlases, - const std::vector<Image*> &restrict images); + STD_VECTOR<TextureAtlas*> &restrict atlases, + const STD_VECTOR<Image*> &restrict images); static void simpleSort(const std::string &restrict name, - std::vector<TextureAtlas*> &restrict atlases, - const std::vector<Image*> &restrict images, + STD_VECTOR<TextureAtlas*> &restrict atlases, + const STD_VECTOR<Image*> &restrict images, int size); static void createSDLAtlas(TextureAtlas *const atlas) A_NONNULL(1); diff --git a/src/resources/atlas/atlasresource.cpp b/src/resources/atlas/atlasresource.cpp index 51a807975..b97823ebb 100644 --- a/src/resources/atlas/atlasresource.cpp +++ b/src/resources/atlas/atlasresource.cpp @@ -31,12 +31,12 @@ AtlasResource::~AtlasResource() { - FOR_EACH (std::vector<TextureAtlas*>::iterator, it, atlases) + FOR_EACH (STD_VECTOR<TextureAtlas*>::iterator, it, atlases) { TextureAtlas *const atlas = *it; if (atlas != nullptr) { - FOR_EACH (std::vector<AtlasItem*>::iterator, it2, atlas->items) + FOR_EACH (STD_VECTOR<AtlasItem*>::iterator, it2, atlas->items) { AtlasItem *const item = *it2; if (item != nullptr) @@ -80,7 +80,7 @@ int AtlasResource::calcMemoryLocal() const int AtlasResource::calcMemoryChilds(const int level) const { int sz = 0; - FOR_EACH (std::vector<TextureAtlas*>::const_iterator, it, atlases) + FOR_EACH (STD_VECTOR<TextureAtlas*>::const_iterator, it, atlases) { TextureAtlas *const atlas = *it; sz += atlas->calcMemory(level + 1); diff --git a/src/resources/atlas/atlasresource.h b/src/resources/atlas/atlasresource.h index ba0d441ea..60be25c1d 100644 --- a/src/resources/atlas/atlasresource.h +++ b/src/resources/atlas/atlasresource.h @@ -48,7 +48,7 @@ class AtlasResource final : public Resource int calcMemoryChilds(const int level) const override final; - std::vector<TextureAtlas*> atlases; + STD_VECTOR<TextureAtlas*> atlases; }; #endif // USE_OPENGL diff --git a/src/resources/atlas/textureatlas.h b/src/resources/atlas/textureatlas.h index a1fe4d145..ff74049d5 100644 --- a/src/resources/atlas/textureatlas.h +++ b/src/resources/atlas/textureatlas.h @@ -59,7 +59,7 @@ struct TextureAtlas final : public MemoryCounter int calcMemoryChilds(const int level) const override final { int sz = 0; - FOR_EACH (std::vector<AtlasItem*>::const_iterator, it, items) + FOR_EACH (STD_VECTOR<AtlasItem*>::const_iterator, it, items) { AtlasItem *const item = *it; sz += item->calcMemory(level + 1); @@ -74,7 +74,7 @@ struct TextureAtlas final : public MemoryCounter Image *atlasImage; int width; int height; - std::vector <AtlasItem*> items; + STD_VECTOR <AtlasItem*> items; }; #endif // USE_OPENGL diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index d0511e872..326d5fd9a 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -240,7 +240,7 @@ void BeingInfo::addMenu(const std::string &name, const std::string &command) mMenu.push_back(BeingMenuItem(name, command)); } -const std::vector<BeingMenuItem> &BeingInfo::getMenu() const +const STD_VECTOR<BeingMenuItem> &BeingInfo::getMenu() const { return mMenu; } diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h index 531392e99..7e016d580 100644 --- a/src/resources/beinginfo.h +++ b/src/resources/beinginfo.h @@ -328,7 +328,7 @@ class BeingInfo final void addMenu(const std::string &name, const std::string &command); - const std::vector<BeingMenuItem> &getMenu() const A_CONST; + const STD_VECTOR<BeingMenuItem> &getMenu() const A_CONST; void setString(const int idx, const std::string &value) @@ -353,7 +353,7 @@ class BeingInfo final CursorT mHoverCursor; ItemSoundEvents mSounds; Attacks mAttacks; - std::vector<BeingMenuItem> mMenu; + STD_VECTOR<BeingMenuItem> mMenu; std::map<int, std::string> mStrings; std::string mCurrency; unsigned char mBlockWalkMask; diff --git a/src/resources/db/chardb.cpp b/src/resources/db/chardb.cpp index fe87ea157..915c3444b 100644 --- a/src/resources/db/chardb.cpp +++ b/src/resources/db/chardb.cpp @@ -40,7 +40,7 @@ namespace unsigned mMaxLook = 0; unsigned mMinRace = 0; unsigned mMaxRace = 30; - std::vector<BeingSlot> mDefaultItems; + STD_VECTOR<BeingSlot> mDefaultItems; } // namespace void CharDB::load() @@ -181,7 +181,7 @@ unsigned CharDB::getMaxRace() return mMaxRace; } -const std::vector<BeingSlot> &CharDB::getDefaultItems() +const STD_VECTOR<BeingSlot> &CharDB::getDefaultItems() { return mDefaultItems; } diff --git a/src/resources/db/chardb.h b/src/resources/db/chardb.h index 083e7c12d..f940d3059 100644 --- a/src/resources/db/chardb.h +++ b/src/resources/db/chardb.h @@ -69,7 +69,7 @@ namespace CharDB unsigned getMaxRace() A_WARN_UNUSED; - const std::vector<BeingSlot> &getDefaultItems() A_WARN_UNUSED; + const STD_VECTOR<BeingSlot> &getDefaultItems() A_WARN_UNUSED; } // namespace CharDB #endif // RESOURCES_DB_CHARDB_H diff --git a/src/resources/db/deaddb.cpp b/src/resources/db/deaddb.cpp index bcca023eb..8c273e239 100644 --- a/src/resources/db/deaddb.cpp +++ b/src/resources/db/deaddb.cpp @@ -32,7 +32,7 @@ namespace { bool mLoaded = false; - std::vector<std::string> mMessages; + STD_VECTOR<std::string> mMessages; } // namespace void DeadDB::load() diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 57000cf95..e23623367 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -1050,10 +1050,10 @@ static void loadOrderSprite(ItemInfo *const itemInfo, itemInfo->setDrawPriority(direction, priority); } -std::string ItemDB::getNamesStr(const std::vector<int> &parts) +std::string ItemDB::getNamesStr(const STD_VECTOR<int> &parts) { std::string str; - FOR_EACH (std::vector<int>::const_iterator, it, parts) + FOR_EACH (STD_VECTOR<int>::const_iterator, it, parts) { const int id = *it; if (exists(id)) diff --git a/src/resources/db/itemdb.h b/src/resources/db/itemdb.h index 34421d84b..96de60b6a 100644 --- a/src/resources/db/itemdb.h +++ b/src/resources/db/itemdb.h @@ -63,7 +63,7 @@ namespace ItemDB const ItemDB::ItemInfos &getItemInfos(); - std::string getNamesStr(const std::vector<int> &parts); + std::string getNamesStr(const STD_VECTOR<int> &parts); #ifdef UNITTESTS ItemDB::NamedItemInfos &getNamedItemInfosTest(); diff --git a/src/resources/db/itemoptiondb.cpp b/src/resources/db/itemoptiondb.cpp index bd78f95c5..2f7fc1ccd 100644 --- a/src/resources/db/itemoptiondb.cpp +++ b/src/resources/db/itemoptiondb.cpp @@ -33,7 +33,7 @@ namespace { ItemOptionDb::OptionInfos mOptions; - const std::vector<ItemFieldType*> mEmptyOption; + const STD_VECTOR<ItemFieldType*> mEmptyOption; bool mLoaded = false; } // namespace @@ -48,7 +48,7 @@ void ItemOptionDb::load() mLoaded = true; } -static void addFieldByName(std::vector<ItemFieldType*> &options, +static void addFieldByName(STD_VECTOR<ItemFieldType*> &options, XmlNodeConstPtr node, const ItemFieldDb::FieldInfos &fields, const char *const name) @@ -68,7 +68,7 @@ static void addFieldByName(std::vector<ItemFieldType*> &options, } } -static void readOptionFields(std::vector<ItemFieldType*> &options, +static void readOptionFields(STD_VECTOR<ItemFieldType*> &options, XmlNodeConstPtr node, const ItemFieldDb::FieldInfos &fields) { @@ -127,7 +127,7 @@ void ItemOptionDb::loadXmlFile(const std::string &fileName, reportAlways("Empty id field in ItemOptionDb"); continue; } - std::vector<ItemFieldType*> &options = mOptions[id]; + STD_VECTOR<ItemFieldType*> &options = mOptions[id]; readOptionFields(options, node, requiredFields); readOptionFields(options, node, addFields); } @@ -140,7 +140,7 @@ void ItemOptionDb::unload() mLoaded = false; } -const std::vector<ItemFieldType*> &ItemOptionDb::getFields(const int id) +const STD_VECTOR<ItemFieldType*> &ItemOptionDb::getFields(const int id) { OptionInfos::const_iterator it = mOptions.find(id); if (it == mOptions.end()) diff --git a/src/resources/db/itemoptiondb.h b/src/resources/db/itemoptiondb.h index a4fb82638..8d9bc9968 100644 --- a/src/resources/db/itemoptiondb.h +++ b/src/resources/db/itemoptiondb.h @@ -41,9 +41,9 @@ namespace ItemOptionDb void loadXmlFile(const std::string &fileName, const SkipError skipError); - const std::vector<ItemFieldType*> &getFields(const int id); + const STD_VECTOR<ItemFieldType*> &getFields(const int id); - typedef std::map<int, std::vector<ItemFieldType*> > OptionInfos; + typedef std::map<int, STD_VECTOR<ItemFieldType*> > OptionInfos; } // namespace ItemOptionDb #endif // RESOURCES_DB_ITEMOPTIONDB_H diff --git a/src/resources/db/networkdb.h b/src/resources/db/networkdb.h index 697adbc44..0541f9c1f 100644 --- a/src/resources/db/networkdb.h +++ b/src/resources/db/networkdb.h @@ -30,7 +30,7 @@ typedef std::map<int32_t, int32_t> NetworkInPacketInfos; typedef NetworkInPacketInfos::const_iterator NetworkInPacketInfosIter; -typedef std::vector<int> NetworkRemovePacketInfos; +typedef STD_VECTOR<int> NetworkRemovePacketInfos; typedef NetworkRemovePacketInfos::const_iterator NetworkRemovePacketInfosIter; namespace NetworkDb diff --git a/src/resources/db/questdb.cpp b/src/resources/db/questdb.cpp index 6ac2c7f34..44c59226c 100644 --- a/src/resources/db/questdb.cpp +++ b/src/resources/db/questdb.cpp @@ -39,8 +39,8 @@ namespace // quest variables: var, (val1, val2, val3, time) NpcQuestVarMap mVars; // quests: var, quests - std::map<int, std::vector<QuestItem*> > mQuests; - std::vector<QuestEffect*> mAllEffects; + std::map<int, STD_VECTOR<QuestItem*> > mQuests; + STD_VECTOR<QuestEffect*> mAllEffects; } // namespace void QuestDb::load() @@ -213,11 +213,11 @@ void QuestDb::loadXmlFile(const std::string &fileName, void QuestDb::unload() { - for (std::map<int, std::vector<QuestItem*> >::iterator it + for (std::map<int, STD_VECTOR<QuestItem*> >::iterator it = mQuests.begin(), it_end = mQuests.end(); it != it_end; ++ it) { - std::vector<QuestItem*> &quests = (*it).second; - for (std::vector<QuestItem*>::iterator it2 = quests.begin(), + STD_VECTOR<QuestItem*> &quests = (*it).second; + for (STD_VECTOR<QuestItem*>::iterator it2 = quests.begin(), it2_end = quests.end(); it2 != it2_end; ++ it2) { delete *it2; @@ -233,26 +233,26 @@ NpcQuestVarMap *QuestDb::getVars() return &mVars; } -std::map<int, std::vector<QuestItem*> > *QuestDb::getQuests() +std::map<int, STD_VECTOR<QuestItem*> > *QuestDb::getQuests() { return &mQuests; } -std::vector<QuestEffect*> *QuestDb::getAllEffects() +STD_VECTOR<QuestEffect*> *QuestDb::getAllEffects() { return &mAllEffects; } std::string QuestDb::getName(const int id) { - std::map<int, std::vector<QuestItem*> >::const_iterator it = + std::map<int, STD_VECTOR<QuestItem*> >::const_iterator it = mQuests.find(id); if (it == mQuests.end()) { // TRANSLATORS: quests window quest name return _("unknown"); } - const std::vector<QuestItem*> &items = (*it).second; + const STD_VECTOR<QuestItem*> &items = (*it).second; if (items.empty()) { // TRANSLATORS: quests window quest name diff --git a/src/resources/db/questdb.h b/src/resources/db/questdb.h index 1bec2cc4e..865f917fe 100644 --- a/src/resources/db/questdb.h +++ b/src/resources/db/questdb.h @@ -45,9 +45,9 @@ namespace QuestDb NpcQuestVarMap *getVars(); - std::map<int, std::vector<QuestItem*> > *getQuests(); + std::map<int, STD_VECTOR<QuestItem*> > *getQuests(); - std::vector<QuestEffect*> *getAllEffects(); + STD_VECTOR<QuestEffect*> *getAllEffects(); std::string getName(const int id); } // namespace QuestDb diff --git a/src/resources/db/sounddb.cpp b/src/resources/db/sounddb.cpp index 0907f5cdc..90dc9fe00 100644 --- a/src/resources/db/sounddb.cpp +++ b/src/resources/db/sounddb.cpp @@ -32,7 +32,7 @@ namespace { std::string mDefault; - std::vector<std::string> mSounds; + STD_VECTOR<std::string> mSounds; } // namespace void SoundDB::load() diff --git a/src/resources/db/statdb.cpp b/src/resources/db/statdb.cpp index 26734bdb3..08fef09d6 100644 --- a/src/resources/db/statdb.cpp +++ b/src/resources/db/statdb.cpp @@ -35,9 +35,9 @@ namespace { bool mLoaded = false; - std::vector<BasicStat> mBasicStats; - std::map<std::string, std::vector<BasicStat> > mStats; - std::vector<std::string> mPages; + STD_VECTOR<BasicStat> mBasicStats; + std::map<std::string, STD_VECTOR<BasicStat> > mStats; + STD_VECTOR<std::string> mPages; } // namespace void StatDb::addDefaultStats() @@ -68,17 +68,17 @@ void StatDb::addDefaultStats() _("Luck"))); } -const std::vector<BasicStat> &StatDb::getBasicStats() +const STD_VECTOR<BasicStat> &StatDb::getBasicStats() { return mBasicStats; } -const std::vector<BasicStat> &StatDb::getStats(const std::string &page) +const STD_VECTOR<BasicStat> &StatDb::getStats(const std::string &page) { return mStats[page]; } -const std::vector<std::string> &StatDb::getPages() +const STD_VECTOR<std::string> &StatDb::getPages() { return mPages; } @@ -135,7 +135,7 @@ static void loadStats(XmlNodeConstPtr rootNode, const std::string &page) { const int maxAttr = static_cast<int>(Attributes::MAX_ATTRIBUTE); - std::vector<BasicStat> &stats = mStats[page]; + STD_VECTOR<BasicStat> &stats = mStats[page]; mPages.push_back(page); for_each_xml_child_node(node, rootNode) { diff --git a/src/resources/db/statdb.h b/src/resources/db/statdb.h index 898f0af63..73b24894b 100644 --- a/src/resources/db/statdb.h +++ b/src/resources/db/statdb.h @@ -40,11 +40,11 @@ namespace StatDb void addDefaultStats(); - const std::vector<BasicStat> &getBasicStats(); + const STD_VECTOR<BasicStat> &getBasicStats(); - const std::vector<BasicStat> &getStats(const std::string &page); + const STD_VECTOR<BasicStat> &getStats(const std::string &page); - const std::vector<std::string> &getPages(); + const STD_VECTOR<std::string> &getPages(); } // namespace StatDb #endif // RESOURCES_DB_STATDB_H diff --git a/src/resources/db/unitsdb.cpp b/src/resources/db/unitsdb.cpp index 998dd7230..bf498411b 100644 --- a/src/resources/db/unitsdb.cpp +++ b/src/resources/db/unitsdb.cpp @@ -52,7 +52,7 @@ namespace { A_DEFAULT_COPY(UnitDescription) - std::vector<struct UnitLevel> levels; + STD_VECTOR<struct UnitLevel> levels; double conversion; bool mix; }; diff --git a/src/resources/db/weaponsdb.h b/src/resources/db/weaponsdb.h index e30b4f544..a957347bc 100644 --- a/src/resources/db/weaponsdb.h +++ b/src/resources/db/weaponsdb.h @@ -25,7 +25,7 @@ #include "localconsts.h" -typedef std::vector<int> WeaponsInfos; +typedef STD_VECTOR<int> WeaponsInfos; typedef WeaponsInfos::const_iterator WeaponsInfosIter; namespace WeaponsDB diff --git a/src/resources/dye/dyepalette.h b/src/resources/dye/dyepalette.h index 95a26ca52..2db7bd13b 100644 --- a/src/resources/dye/dyepalette.h +++ b/src/resources/dye/dyepalette.h @@ -181,7 +181,7 @@ class DyePalette final #ifndef UNITTESTS private: #endif // UNITTESTS - std::vector<DyeColor> mColors; + STD_VECTOR<DyeColor> mColors; }; #endif // RESOURCES_DYE_DYEPALETTE_H diff --git a/src/resources/dye/dyepalette_replaceacolor.cpp b/src/resources/dye/dyepalette_replaceacolor.cpp index 27c0567cf..256efb8bb 100644 --- a/src/resources/dye/dyepalette_replaceacolor.cpp +++ b/src/resources/dye/dyepalette_replaceacolor.cpp @@ -39,7 +39,7 @@ PRAGMA48(GCC diagnostic pop) void DyePalette::replaceAColorDefault(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if ((sz == 0u) || (pixels == nullptr)) return; @@ -52,7 +52,7 @@ void DyePalette::replaceAColorDefault(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); const unsigned int data = pixels[ptr]; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -94,7 +94,7 @@ void DyePalette::replaceAColorDefault(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(pixels); const unsigned int data = *pixels; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -141,7 +141,7 @@ __attribute__ ((target ("sse2"))) void DyePalette::replaceAColorSse2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if ((sz == 0u) || (pixels == nullptr)) return; @@ -156,7 +156,7 @@ void DyePalette::replaceAColorSse2(uint32_t *restrict pixels, __m128i base = _mm_loadu_si128(reinterpret_cast<__m128i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -182,7 +182,7 @@ void DyePalette::replaceAColorSse2(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); const unsigned int data = pixels[ptr]; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -212,7 +212,7 @@ __attribute__ ((target ("avx2"))) void DyePalette::replaceAColorAvx2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if ((sz == 0u) || (pixels == nullptr)) return; @@ -227,7 +227,7 @@ void DyePalette::replaceAColorAvx2(uint32_t *restrict pixels, __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -253,7 +253,7 @@ void DyePalette::replaceAColorAvx2(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); const unsigned int data = pixels[ptr]; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; diff --git a/src/resources/dye/dyepalette_replaceaoglcolor.cpp b/src/resources/dye/dyepalette_replaceaoglcolor.cpp index 69c3370a4..4d4588bb5 100644 --- a/src/resources/dye/dyepalette_replaceaoglcolor.cpp +++ b/src/resources/dye/dyepalette_replaceaoglcolor.cpp @@ -41,7 +41,7 @@ PRAGMA48(GCC diagnostic pop) void DyePalette::replaceAOGLColorDefault(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if (sz == 0u || pixels == nullptr) return; @@ -54,7 +54,7 @@ void DyePalette::replaceAOGLColorDefault(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); const unsigned int data = pixels[ptr]; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -96,7 +96,7 @@ void DyePalette::replaceAOGLColorDefault(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(pixels); const unsigned int data = *pixels; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -144,7 +144,7 @@ __attribute__ ((target ("sse2"))) void DyePalette::replaceAOGLColorSse2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if (sz == 0u || pixels == nullptr) return; @@ -160,7 +160,7 @@ void DyePalette::replaceAOGLColorSse2(uint32_t *restrict pixels, __m128i base = _mm_loadu_si128(reinterpret_cast<__m128i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -188,7 +188,7 @@ void DyePalette::replaceAOGLColorSse2(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); const unsigned int data = pixels[ptr]; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -230,7 +230,7 @@ void DyePalette::replaceAOGLColorSse2(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(pixels); const unsigned int data = *pixels; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -270,7 +270,7 @@ __attribute__ ((target ("avx2"))) void DyePalette::replaceAOGLColorAvx2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if (sz == 0u || pixels == nullptr) return; @@ -286,7 +286,7 @@ void DyePalette::replaceAOGLColorAvx2(uint32_t *restrict pixels, __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -316,7 +316,7 @@ void DyePalette::replaceAOGLColorAvx2(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(&pixels[ptr]); const unsigned int data = pixels[ptr]; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -358,7 +358,7 @@ void DyePalette::replaceAOGLColorAvx2(uint32_t *restrict pixels, uint8_t *const p = reinterpret_cast<uint8_t *>(pixels); const unsigned int data = *pixels; - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; diff --git a/src/resources/dye/dyepalette_replacescolor.cpp b/src/resources/dye/dyepalette_replacescolor.cpp index 469d5507c..1d1c2676e 100644 --- a/src/resources/dye/dyepalette_replacescolor.cpp +++ b/src/resources/dye/dyepalette_replacescolor.cpp @@ -39,7 +39,7 @@ PRAGMA48(GCC diagnostic pop) void DyePalette::replaceSColorDefault(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if (sz == 0u || pixels == nullptr) return; @@ -57,7 +57,7 @@ void DyePalette::replaceSColorDefault(uint32_t *restrict pixels, const unsigned int data = pixels[ptr] & 0xffffff00; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -96,7 +96,7 @@ void DyePalette::replaceSColorDefault(uint32_t *restrict pixels, const unsigned int data = (*pixels) & 0xffffff00; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -139,7 +139,7 @@ __attribute__ ((target ("sse2"))) void DyePalette::replaceSColorSse2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if (sz == 0u || pixels == nullptr) return; @@ -155,7 +155,7 @@ void DyePalette::replaceSColorSse2(uint32_t *restrict pixels, __m128i base = _mm_loadu_si128(reinterpret_cast<__m128i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -187,7 +187,7 @@ void DyePalette::replaceSColorSse2(uint32_t *restrict pixels, const unsigned int data = pixels[ptr] & 0xffffff00; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -220,7 +220,7 @@ __attribute__ ((target ("avx2"))) void DyePalette::replaceSColorAvx2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if (sz == 0u || pixels == nullptr) return; @@ -236,7 +236,7 @@ void DyePalette::replaceSColorAvx2(uint32_t *restrict pixels, __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -268,7 +268,7 @@ void DyePalette::replaceSColorAvx2(uint32_t *restrict pixels, const unsigned int data = pixels[ptr] & 0xffffff00; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; diff --git a/src/resources/dye/dyepalette_replacesoglcolor.cpp b/src/resources/dye/dyepalette_replacesoglcolor.cpp index aaf05a66e..b5c2c621a 100644 --- a/src/resources/dye/dyepalette_replacesoglcolor.cpp +++ b/src/resources/dye/dyepalette_replacesoglcolor.cpp @@ -41,7 +41,7 @@ PRAGMA48(GCC diagnostic pop) void DyePalette::replaceSOGLColorDefault(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if ((sz == 0u) || (pixels == nullptr)) return; @@ -59,7 +59,7 @@ void DyePalette::replaceSOGLColorDefault(uint32_t *restrict pixels, const unsigned int data = (pixels[ptr]) & 0x00ffffff; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -101,7 +101,7 @@ void DyePalette::replaceSOGLColorDefault(uint32_t *restrict pixels, const unsigned int data = (*pixels) & 0x00ffffff; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -144,7 +144,7 @@ __attribute__ ((target ("sse2"))) void DyePalette::replaceSOGLColorSse2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if ((sz == 0u) || (pixels == nullptr)) return; @@ -161,7 +161,7 @@ void DyePalette::replaceSOGLColorSse2(uint32_t *restrict pixels, __m128i base = _mm_loadu_si128(reinterpret_cast<__m128i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -195,7 +195,7 @@ void DyePalette::replaceSOGLColorSse2(uint32_t *restrict pixels, const unsigned int data = (pixels[ptr]) & 0x00ffffff; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -237,7 +237,7 @@ void DyePalette::replaceSOGLColorSse2(uint32_t *restrict pixels, const unsigned int data = (*pixels) & 0x00ffffff; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -272,7 +272,7 @@ __attribute__ ((target ("avx2"))) void DyePalette::replaceSOGLColorAvx2(uint32_t *restrict pixels, const int bufSize) const restrict2 { - std::vector<DyeColor>::const_iterator it_end = mColors.end(); + STD_VECTOR<DyeColor>::const_iterator it_end = mColors.end(); const size_t sz = mColors.size(); if ((sz == 0u) || (pixels == nullptr)) return; @@ -289,7 +289,7 @@ void DyePalette::replaceSOGLColorAvx2(uint32_t *restrict pixels, __m256i base = _mm256_loadu_si256(reinterpret_cast<__m256i*>( &pixels[ptr])); - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -325,7 +325,7 @@ void DyePalette::replaceSOGLColorAvx2(uint32_t *restrict pixels, const unsigned int data = (pixels[ptr]) & 0x00ffffff; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; @@ -367,7 +367,7 @@ void DyePalette::replaceSOGLColorAvx2(uint32_t *restrict pixels, const unsigned int data = (*pixels) & 0x00ffffff; #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN - std::vector<DyeColor>::const_iterator it = mColors.begin(); + STD_VECTOR<DyeColor>::const_iterator it = mColors.begin(); while (it != it_end) { const DyeColor &col = *it; diff --git a/src/resources/horseinfo.h b/src/resources/horseinfo.h index 6b628dfcb..1ff800186 100644 --- a/src/resources/horseinfo.h +++ b/src/resources/horseinfo.h @@ -48,8 +48,8 @@ struct HorseInfo final A_DELETE_COPY(HorseInfo) - std::vector<SpriteReference*> downSprites; - std::vector<SpriteReference*> upSprites; + STD_VECTOR<SpriteReference*> downSprites; + STD_VECTOR<SpriteReference*> upSprites; HorseOffset offsets[10]; // by direction }; diff --git a/src/resources/imageset.h b/src/resources/imageset.h index 9aaad6e4b..78907fbba 100644 --- a/src/resources/imageset.h +++ b/src/resources/imageset.h @@ -62,7 +62,7 @@ class ImageSet notfinal : public Resource int getHeight() const noexcept2 A_WARN_UNUSED { return mHeight; } - typedef std::vector<Image*>::size_type size_type; + typedef STD_VECTOR<Image*>::size_type size_type; Image* get(const size_type i) const A_WARN_UNUSED; @@ -81,13 +81,13 @@ class ImageSet notfinal : public Resource void setOffsetY(const int n) noexcept2 { mOffsetY = n; } - const std::vector<Image*> &getImages() const noexcept2 A_WARN_UNUSED + const STD_VECTOR<Image*> &getImages() const noexcept2 A_WARN_UNUSED { return mImages; } int calcMemoryLocal() const override; private: - std::vector<Image*> mImages; + STD_VECTOR<Image*> mImages; int mWidth; /**< Width of the images in the image set. */ int mHeight; /**< Height of the images in the image set. */ diff --git a/src/resources/item/complexitem.cpp b/src/resources/item/complexitem.cpp index b9de8dbe1..1fd703f8c 100644 --- a/src/resources/item/complexitem.cpp +++ b/src/resources/item/complexitem.cpp @@ -62,7 +62,7 @@ void ComplexItem::addChild(const Item *const item, return; increaseQuantity(amount); Item *child = nullptr; - FOR_EACH (std::vector<Item*>::iterator, it, mChildItems) + FOR_EACH (STD_VECTOR<Item*>::iterator, it, mChildItems) { Item *const item1 = *it; if (item1->getId() == item->getId() && diff --git a/src/resources/item/complexitem.h b/src/resources/item/complexitem.h index 6103f23b6..aa41fb3fd 100644 --- a/src/resources/item/complexitem.h +++ b/src/resources/item/complexitem.h @@ -55,11 +55,11 @@ class ComplexItem final : public Item void addChild(const Item *const item, const int amount); - const std::vector<Item*> &getChilds() const noexcept2 A_WARN_UNUSED + const STD_VECTOR<Item*> &getChilds() const noexcept2 A_WARN_UNUSED { return mChildItems; } protected: - std::vector<Item*> mChildItems; + STD_VECTOR<Item*> mChildItems; }; #endif // RESOURCES_ITEM_COMPLEXITEM_H diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index dd91dc738..a80442882 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -338,7 +338,7 @@ class ItemInfo final // sprite, <itemfrom, itemto> [direction] SpriteToItemMap *mSpriteToItemReplaceMap[10]; - std::vector<SpriteToItemMap*> mSpriteToItemReplaceList; + STD_VECTOR<SpriteToItemMap*> mSpriteToItemReplaceList; // Equipment related members. /** Attack type, in case of weapon. 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<ParticleEffectData>::const_iterator + for (STD_VECTOR<ParticleEffectData>::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<MapItem*>::const_iterator, it, mMapPortals) + FOR_EACH (STD_VECTOR<MapItem*>::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<MapObject>::const_iterator it = list->objects.begin(); - const std::vector<MapObject>::const_iterator it_end = list->objects.end(); + STD_VECTOR<MapObject>::const_iterator it = list->objects.begin(); + const STD_VECTOR<MapObject>::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<Tileset*> Tilesets; -typedef std::vector<MapLayer*> Layers; +typedef STD_VECTOR<Tileset*> Tilesets; +typedef STD_VECTOR<MapLayer*> Layers; typedef Layers::const_iterator LayersCIter; -typedef std::vector<AmbientLayer*> AmbientLayerVector; +typedef STD_VECTOR<AmbientLayer*> 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<MapItem*> &getPortals() const restrict2 noexcept2 + const STD_VECTOR<MapItem*> &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<ParticleEffectData> mParticleEffects; + STD_VECTOR<ParticleEffectData> mParticleEffects; - std::vector<MapItem*> mMapPortals; + STD_VECTOR<MapItem*> mMapPortals; std::map<int, TileAnimation*> 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<MapRowVertexes*> MapRows; + typedef STD_VECTOR<MapRowVertexes*> 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<MapObject> objects; + STD_VECTOR<MapObject> 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<ImageVertexes*> MapRowImages; +typedef STD_VECTOR<ImageVertexes*> 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<std::pair<MapLayer*, int> > TilePairVector; +typedef STD_VECTOR<std::pair<MapLayer*, int> > TilePairVector; typedef TilePairVector::const_iterator TilePairVectorCIter; /** diff --git a/src/resources/npcdialogmenuinfo.h b/src/resources/npcdialogmenuinfo.h index a90d1aea0..ba25c51d0 100644 --- a/src/resources/npcdialogmenuinfo.h +++ b/src/resources/npcdialogmenuinfo.h @@ -40,9 +40,9 @@ struct NpcDialogMenuInfo final A_DELETE_COPY(NpcDialogMenuInfo) - std::vector<NpcButtonInfo*> buttons; - std::vector<NpcImageInfo*> images; - std::vector<NpcTextInfo*> texts; + STD_VECTOR<NpcButtonInfo*> buttons; + STD_VECTOR<NpcImageInfo*> images; + STD_VECTOR<NpcTextInfo*> texts; }; #endif // RESOURCES_NPCDIALOGMENUINFO_H diff --git a/src/resources/questitem.h b/src/resources/questitem.h index 27a3881d6..333cc308b 100644 --- a/src/resources/questitem.h +++ b/src/resources/questitem.h @@ -50,7 +50,7 @@ struct QuestItem final std::string group; std::set<int> incomplete; std::set<int> complete; - std::vector<QuestItemText> texts; + STD_VECTOR<QuestItemText> texts; int completeFlag; bool broken; }; diff --git a/src/resources/skill/skillinfo.h b/src/resources/skill/skillinfo.h index 4b4f58fb9..391a19912 100644 --- a/src/resources/skill/skillinfo.h +++ b/src/resources/skill/skillinfo.h @@ -100,7 +100,7 @@ struct SkillInfo final } }; -typedef std::vector<SkillInfo*> SkillList; +typedef STD_VECTOR<SkillInfo*> SkillList; typedef SkillList::iterator SkillListIter; #endif // GUI_WIDGETS_SKILLINFO_H diff --git a/src/resources/soundinfo.h b/src/resources/soundinfo.h index 51fed06bf..82b4138de 100644 --- a/src/resources/soundinfo.h +++ b/src/resources/soundinfo.h @@ -45,7 +45,7 @@ struct SoundInfo final int delay; }; -typedef std::vector<SoundInfo> SoundInfoVect; +typedef STD_VECTOR<SoundInfo> SoundInfoVect; typedef std::map<ItemSoundEvent::Type, SoundInfoVect*> ItemSoundEvents; #endif // RESOURCES_SOUNDINFO_H diff --git a/src/resources/sprite/spritedisplay.h b/src/resources/sprite/spritedisplay.h index 47b13f2af..cabae7267 100644 --- a/src/resources/sprite/spritedisplay.h +++ b/src/resources/sprite/spritedisplay.h @@ -43,7 +43,7 @@ struct SpriteDisplay final std::string image; std::string floor; - std::vector<SpriteReference*> sprites; + STD_VECTOR<SpriteReference*> sprites; StringVect particles; }; diff --git a/src/resources/sprite/spritereference.h b/src/resources/sprite/spritereference.h index f2441e215..8bc38a532 100644 --- a/src/resources/sprite/spritereference.h +++ b/src/resources/sprite/spritereference.h @@ -48,6 +48,6 @@ struct SpriteReference final int variant; }; -typedef std::vector<SpriteReference*>::const_iterator SpriteRefs; +typedef STD_VECTOR<SpriteReference*>::const_iterator SpriteRefs; #endif // RESOURCES_SPRITE_SPRITEREFERENCE_H diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp index 2cc4c5754..1fc253f72 100644 --- a/src/resources/wallpaper.cpp +++ b/src/resources/wallpaper.cpp @@ -46,7 +46,7 @@ static bool wallpaperCompare(const WallpaperData &a, const WallpaperData &b); -static std::vector<WallpaperData> wallpaperData; +static STD_VECTOR<WallpaperData> wallpaperData; static bool haveBackup; // Is the backup (no size given) version available? static std::string wallpaperPath; @@ -140,7 +140,7 @@ std::string Wallpaper::getWallpaper(const int width, const int height) // Wallpaper filename container StringVect wallPaperVector; - FOR_EACH (std::vector<WallpaperData>::const_iterator, iter, wallpaperData) + FOR_EACH (STD_VECTOR<WallpaperData>::const_iterator, iter, wallpaperData) { wp = *iter; if (wp.width <= width && wp.height <= height) |