diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-04 15:50:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-04 15:50:56 +0300 |
commit | d0adcf0e3c8a1db5e06bbbb8ae950ea5ebeeb8eb (patch) | |
tree | 33e51821fd54d88d46df4e328f60ba148971ca55 /src/gui/windows | |
parent | 39cec87cfa8b1605239f4b06388bbb07f2a16a89 (diff) | |
download | plus-d0adcf0e3c8a1db5e06bbbb8ae950ea5ebeeb8eb.tar.gz plus-d0adcf0e3c8a1db5e06bbbb8ae950ea5ebeeb8eb.tar.bz2 plus-d0adcf0e3c8a1db5e06bbbb8ae950ea5ebeeb8eb.tar.xz plus-d0adcf0e3c8a1db5e06bbbb8ae950ea5ebeeb8eb.zip |
Add stringmap typedefs.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/equipmentwindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/equipmentwindow.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index 17cb77621..e50b0c488 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -59,7 +59,7 @@ EquipmentWindow *equipmentWindow = nullptr; EquipmentWindow *beingEquipmentWindow = nullptr; static const int BOX_COUNT = 27; -std::map<std::string, int> EquipmentWindow::mSlotNames; +StringIntMap EquipmentWindow::mSlotNames; EquipmentWindow::EquipmentWindow(Equipment *const equipment, Being *const being, @@ -689,7 +689,7 @@ void EquipmentWindow::prepareSlotNames() int EquipmentWindow::parseSlotName(const std::string &name) { - std::map<std::string, int>::const_iterator it = mSlotNames.find(name); + StringIntMapCIter it = mSlotNames.find(name); if (it != mSlotNames.end()) return (*it).second; return -1; diff --git a/src/gui/windows/equipmentwindow.h b/src/gui/windows/equipmentwindow.h index 0b6439f31..27526486a 100644 --- a/src/gui/windows/equipmentwindow.h +++ b/src/gui/windows/equipmentwindow.h @@ -28,6 +28,7 @@ #include "gui/widgets/window.h" +#include "utils/stringmap.h" #include "utils/xml.h" #include "listeners/actionlistener.h" @@ -125,7 +126,7 @@ class EquipmentWindow final : public Window, static int parseSlotName(const std::string &name) A_WARN_UNUSED; - static std::map<std::string, int> mSlotNames; + static StringIntMap mSlotNames; Equipment *mEquipment; |