mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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
This commit is contained in:
parent
8df89db30e
commit
058a869b70
8 changed files with 54 additions and 18 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue