summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-02 17:23:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-02 17:23:32 +0300
commitf89de74b1ac1cd9a02a70dab9221d601296da8cd (patch)
tree444451eb017720bdc1d3457e6e7976a84e065351 /src/gui
parentc2748e2217f0ac69e2f06f39e6411f5e77c11974 (diff)
downloadmv-f89de74b1ac1cd9a02a70dab9221d601296da8cd.tar.gz
mv-f89de74b1ac1cd9a02a70dab9221d601296da8cd.tar.bz2
mv-f89de74b1ac1cd9a02a70dab9221d601296da8cd.tar.xz
mv-f89de74b1ac1cd9a02a70dab9221d601296da8cd.zip
Add intmap defines.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/questswindow.cpp6
-rw-r--r--src/gui/windows/questswindow.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index 690781cea..8d4d1eebb 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -295,8 +295,7 @@ void QuestsWindow::rebuild(const bool playSound)
int updatedQuest = -1;
int newCompleteStatus = -1;
- for (std::map<int, int>::const_iterator it = mVars.begin(),
- it_end = mVars.end(); it != it_end; ++ it)
+ FOR_EACH (IntMapCIter, it, mVars)
{
const int var = (*it).first;
const int val = (*it).second;
@@ -454,8 +453,7 @@ void QuestsWindow::updateEffects()
const QuestEffect *const effect = *it;
if (effect)
{
- const std::map<int, int>::const_iterator
- varIt = mVars.find(effect->var);
+ const IntMapCIter varIt = mVars.find(effect->var);
if (varIt != mVars.end())
{
const std::set<int> &vals = effect->values;
diff --git a/src/gui/windows/questswindow.h b/src/gui/windows/questswindow.h
index 031f239cd..d016a6a25 100644
--- a/src/gui/windows/questswindow.h
+++ b/src/gui/windows/questswindow.h
@@ -27,6 +27,7 @@
#include "gui/widgets/window.h"
+#include "utils/intmap.h"
#include "utils/xml.h"
#include "listeners/actionlistener.h"
@@ -87,7 +88,7 @@ class QuestsWindow final : public Window,
Image *mCompleteIcon;
Image *mIncompleteIcon;
// quest variables: var, value
- std::map<int, int> mVars;
+ IntMap mVars;
// quests: var, quests
std::map<int, std::vector<QuestItem*> > mQuests;
std::vector<QuestEffect*> mAllEffects;