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/db/questdb.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/resources/db/questdb.cpp') 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 > mQuests; - std::vector mAllEffects; + std::map > mQuests; + STD_VECTOR mAllEffects; } // namespace void QuestDb::load() @@ -213,11 +213,11 @@ void QuestDb::loadXmlFile(const std::string &fileName, void QuestDb::unload() { - for (std::map >::iterator it + for (std::map >::iterator it = mQuests.begin(), it_end = mQuests.end(); it != it_end; ++ it) { - std::vector &quests = (*it).second; - for (std::vector::iterator it2 = quests.begin(), + STD_VECTOR &quests = (*it).second; + for (STD_VECTOR::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 > *QuestDb::getQuests() +std::map > *QuestDb::getQuests() { return &mQuests; } -std::vector *QuestDb::getAllEffects() +STD_VECTOR *QuestDb::getAllEffects() { return &mAllEffects; } std::string QuestDb::getName(const int id) { - std::map >::const_iterator it = + std::map >::const_iterator it = mQuests.find(id); if (it == mQuests.end()) { // TRANSLATORS: quests window quest name return _("unknown"); } - const std::vector &items = (*it).second; + const STD_VECTOR &items = (*it).second; if (items.empty()) { // TRANSLATORS: quests window quest name -- cgit v1.2.3-60-g2f50