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/resources/mapreader.cpp | |
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/resources/mapreader.cpp')
-rw-r--r-- | src/resources/mapreader.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 337b76df4..c2ccd9dc5 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -45,6 +45,7 @@ #include "utils/base64.h" #include "utils/delete2.h" +#include "utils/stringmap.h" #include <iostream> #include <zlib.h> @@ -969,7 +970,7 @@ Tileset *MapReader::readTileset(XmlNodePtr node, if (isProps) { // read tile properties to a map for simpler handling - std::map<std::string, int> tileProperties; + StringIntMap tileProperties; for_each_xml_child_node(propertyNode, tileNode) { if (!xmlNameEqual(propertyNode, "property")) @@ -998,9 +999,9 @@ Tileset *MapReader::readTileset(XmlNodePtr node, for (int i = 0; ; i++) { const std::string iStr(toString(i)); - const std::map<std::string, int>::const_iterator iFrame + StringIntMapCIter iFrame = tileProperties.find("animation-frame" + iStr); - const std::map<std::string, int>::const_iterator iDelay + StringIntMapCIter iDelay = tileProperties.find("animation-delay" + iStr); // possible need add random attribute? if (iFrame != tileProperties.end() |