diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2016-10-06 08:48:20 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2016-10-06 12:33:35 +0200 |
commit | 667975fe3adee935a3f4d2b1a421a295771c664d (patch) | |
tree | 9cbc5505b0aa528eabe103e49cbe0ff205f87527 /src/script | |
parent | 997fc59c7e29a4d2b3f19df9972f3a7d4ac894e3 (diff) | |
download | minetest-667975fe3adee935a3f4d2b1a421a295771c664d.tar.gz minetest-667975fe3adee935a3f4d2b1a421a295771c664d.tar.bz2 minetest-667975fe3adee935a3f4d2b1a421a295771c664d.zip |
Use more unordered_maps to improve performance in c++11 builds
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/lua_api/l_mapgen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp index a176f4f52..da8e71cdc 100644 --- a/src/script/lua_api/l_mapgen.cpp +++ b/src/script/lua_api/l_mapgen.cpp @@ -244,7 +244,7 @@ bool read_schematic_def(lua_State *L, int index, schem->schemdata = new MapNode[numnodes]; size_t names_base = names->size(); - std::map<std::string, content_t> name_id_map; + UNORDERED_MAP<std::string, content_t> name_id_map; u32 i = 0; for (lua_pushnil(L); lua_next(L, -2); i++, lua_pop(L, 1)) { @@ -266,7 +266,7 @@ bool read_schematic_def(lua_State *L, int index, u8 param2 = getintfield_default(L, -1, "param2", 0); //// Find or add new nodename-to-ID mapping - std::map<std::string, content_t>::iterator it = name_id_map.find(name); + UNORDERED_MAP<std::string, content_t>::iterator it = name_id_map.find(name); content_t name_index; if (it != name_id_map.end()) { name_index = it->second; |