summaryrefslogtreecommitdiff
path: root/src/resources/db/questdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-14 01:31:22 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-14 01:31:22 +0300
commit311c175f3184103950c72bc5c775174597430b83 (patch)
treead022dc44a1c4177b3d53bf0d7eaa5a1736c8cf1 /src/resources/db/questdb.cpp
parent16bcb81b0509725e4546bcb3c390ca3c1bb7e7b1 (diff)
downloadplus-311c175f3184103950c72bc5c775174597430b83.tar.gz
plus-311c175f3184103950c72bc5c775174597430b83.tar.bz2
plus-311c175f3184103950c72bc5c775174597430b83.tar.xz
plus-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/db/questdb.cpp')
-rw-r--r--src/resources/db/questdb.cpp18
1 files changed, 9 insertions, 9 deletions
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