diff options
author | Ner'zhul <nerzhul@users.noreply.github.com> | 2016-08-10 12:08:05 +0200 |
---|---|---|
committer | est31 <est31@users.noreply.github.com> | 2016-08-10 12:08:05 +0200 |
commit | 058a869b70072aba8baea47e359c45e82daaf152 (patch) | |
tree | b0dd1820e89975d7172836d4861d9ab2ae2b472d /src/mg_ore.cpp | |
parent | 8df89db30e80eff2ebbf30f0331b8ab4906a410e (diff) | |
download | minetest-058a869b70072aba8baea47e359c45e82daaf152.tar.gz minetest-058a869b70072aba8baea47e359c45e82daaf152.tar.bz2 minetest-058a869b70072aba8baea47e359c45e82daaf152.zip |
Permit usage of std::unordered_map & std::unorderered_set on c++11 compilers (#4430)
This fallback to std::map & std::set for older compilers
Use UNORDERED_SET as an example in decoration and ore biome sets
Use UNORDERED_MAP as an example in nameidmapping
Diffstat (limited to 'src/mg_ore.cpp')
-rw-r--r-- | src/mg_ore.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mg_ore.cpp b/src/mg_ore.cpp index 257901614..d840d745a 100644 --- a/src/mg_ore.cpp +++ b/src/mg_ore.cpp @@ -148,7 +148,7 @@ void OreScatter::generate(MMVManip *vm, int mapseed, u32 blockseed, if (biomemap && !biomes.empty()) { u32 index = sizex * (z0 - nmin.Z) + (x0 - nmin.X); - std::set<u8>::iterator it = biomes.find(biomemap[index]); + UNORDERED_SET<u8>::iterator it = biomes.find(biomemap[index]); if (it == biomes.end()) continue; } @@ -202,7 +202,7 @@ void OreSheet::generate(MMVManip *vm, int mapseed, u32 blockseed, continue; if (biomemap && !biomes.empty()) { - std::set<u8>::iterator it = biomes.find(biomemap[index]); + UNORDERED_SET<u8>::iterator it = biomes.find(biomemap[index]); if (it == biomes.end()) continue; } @@ -270,7 +270,7 @@ void OrePuff::generate(MMVManip *vm, int mapseed, u32 blockseed, continue; if (biomemap && !biomes.empty()) { - std::set<u8>::iterator it = biomes.find(biomemap[index]); + UNORDERED_SET<u8>::iterator it = biomes.find(biomemap[index]); if (it == biomes.end()) continue; } @@ -338,7 +338,7 @@ void OreBlob::generate(MMVManip *vm, int mapseed, u32 blockseed, if (biomemap && !biomes.empty()) { u32 bmapidx = sizex * (z0 - nmin.Z) + (x0 - nmin.X); - std::set<u8>::iterator it = biomes.find(biomemap[bmapidx]); + UNORDERED_SET<u8>::iterator it = biomes.find(biomemap[bmapidx]); if (it == biomes.end()) continue; } @@ -422,7 +422,7 @@ void OreVein::generate(MMVManip *vm, int mapseed, u32 blockseed, if (biomemap && !biomes.empty()) { u32 bmapidx = sizex * (z - nmin.Z) + (x - nmin.X); - std::set<u8>::iterator it = biomes.find(biomemap[bmapidx]); + UNORDERED_SET<u8>::iterator it = biomes.find(biomemap[bmapidx]); if (it == biomes.end()) continue; } |