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/gui/windows/questswindow.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/gui/windows/questswindow.cpp') diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp index af9f19369..1eb2da841 100644 --- a/src/gui/windows/questswindow.cpp +++ b/src/gui/windows/questswindow.cpp @@ -187,10 +187,10 @@ void QuestsWindow::rebuild(const bool playSound) mQuestLinks.clear(); mQuestReverseLinks.clear(); StringVect &names = mQuestsModel->getNames(); - std::vector &images = mQuestsModel->getImages(); - std::vector complete; - std::vector incomplete; - std::vector hidden; + STD_VECTOR &images = mQuestsModel->getImages(); + STD_VECTOR complete; + STD_VECTOR incomplete; + STD_VECTOR hidden; int updatedQuest = -1; int newCompleteStatus = -1; @@ -198,8 +198,8 @@ void QuestsWindow::rebuild(const bool playSound) { const int var = (*it).first; const QuestVar &val = (*it).second; - const std::vector &quests = (*mQuests)[var]; - FOR_EACH (std::vector::const_iterator, it2, quests) + const STD_VECTOR &quests = (*mQuests)[var]; + FOR_EACH (STD_VECTOR::const_iterator, it2, quests) { if (*it2 == nullptr) continue; @@ -225,7 +225,7 @@ void QuestsWindow::rebuild(const bool playSound) int k = 0; - for (std::vector::const_iterator it = complete.begin(), + for (STD_VECTOR::const_iterator it = complete.begin(), it_end = complete.end(); it != it_end; ++ it, k ++) { QuestItem *const quest = *it; @@ -250,7 +250,7 @@ void QuestsWindow::rebuild(const bool playSound) } } - for (std::vector::const_iterator it = incomplete.begin(), + for (STD_VECTOR::const_iterator it = incomplete.begin(), it_end = incomplete.end(); it != it_end; ++ it, k ++) { QuestItem *const quest = *it; @@ -274,7 +274,7 @@ void QuestsWindow::rebuild(const bool playSound) } } - FOR_EACH (std::vector::const_iterator, it, hidden) + FOR_EACH (STD_VECTOR::const_iterator, it, hidden) (*it)->completeFlag = -1; if (updatedQuest == -1 || updatedQuest >= CAST_S32( @@ -310,14 +310,14 @@ void QuestsWindow::showQuest(const QuestItem *const quest) if (quest == nullptr) return; - const std::vector &texts = quest->texts; + const STD_VECTOR &texts = quest->texts; const QuestVar &var = (*mVars)[quest->var]; const std::string var1 = toString(var.var1); const std::string var2 = toString(var.var2); const std::string var3 = toString(var.var3); const std::string timeStr = timeDiffToString(var.time1); mText->clearRows(); - FOR_EACH (std::vector::const_iterator, it, texts) + FOR_EACH (STD_VECTOR::const_iterator, it, texts) { const QuestItemText &data = *it; std::string text = data.text; @@ -379,7 +379,7 @@ void QuestsWindow::setMap(const Map *const map) return; const std::string name = mMap->getProperty("shortName"); - FOR_EACHP (std::vector::const_iterator, it, mAllEffects) + FOR_EACHP (STD_VECTOR::const_iterator, it, mAllEffects) { const QuestEffect *const effect = *it; if ((effect != nullptr) && name == effect->map) @@ -394,7 +394,7 @@ void QuestsWindow::updateEffects() NpcQuestEffectMap oldNpc = mNpcEffects; mNpcEffects.clear(); - FOR_EACH (std::vector::const_iterator, + FOR_EACH (STD_VECTOR::const_iterator, it, mMapEffects) { const QuestEffect *const effect = *it; -- cgit v1.2.3-70-g09d2