diff --git a/TileGenerator.cpp b/TileGenerator.cpp index 7056328..5bab022 100644 --- a/TileGenerator.cpp +++ b/TileGenerator.cpp @@ -965,7 +965,7 @@ inline void TileGenerator::renderMapBlock(const ustring &mapBlock, const BlockPo if (content == m_blockIgnoreId || content == m_blockAirId) { continue; } - std::map::iterator blockName = m_nameMap.find(content); + NodeID2NameMap::iterator blockName = m_nameMap.find(content); if (blockName == m_nameMap.end()) continue; const string &name = blockName->second; diff --git a/TileGenerator.h b/TileGenerator.h index 053ed09..9723ecd 100644 --- a/TileGenerator.h +++ b/TileGenerator.h @@ -14,7 +14,11 @@ #include #include #include +#if __cplusplus >= 201103L +#include +#else #include +#endif #include #include #include @@ -31,7 +35,13 @@ class TileGenerator { private: +#if __cplusplus >= 201103L + typedef std::unordered_map ColorMap; + typedef std::unordered_map NodeID2NameMap; +#else typedef std::map ColorMap; + typedef std::map NodeID2NameMap; +#endif public: TileGenerator(); @@ -158,7 +168,7 @@ private: int m_pictWidth; int m_pictHeight; std::list m_positions; - std::map m_nameMap; + NodeID2NameMap m_nameMap; ColorMap m_colors; uint16_t m_readedPixels[16]; std::set m_unknownNodes; diff --git a/db-sqlite3.h b/db-sqlite3.h index 4495051..d4e76b3 100644 --- a/db-sqlite3.h +++ b/db-sqlite3.h @@ -3,7 +3,7 @@ #include "db.h" #include -#if _cplusplus >= 201103L +#if __cplusplus >= 201103L #include #else #include @@ -14,7 +14,7 @@ #include "types.h" class DBSQLite3 : public DB { -#if _cplusplus >= 201103L +#if __cplusplus >= 201103L typedef std::unordered_map BlockCache; #else typedef std::map BlockCache;