diff options
Diffstat (limited to 'src/mg_decoration.cpp')
-rw-r--r-- | src/mg_decoration.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mg_decoration.cpp b/src/mg_decoration.cpp index b0566e830..1a469cd9c 100644 --- a/src/mg_decoration.cpp +++ b/src/mg_decoration.cpp @@ -208,14 +208,11 @@ size_t Decoration::placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax) #endif } - if (mg->biomemap) { - UNORDERED_SET<u8>::iterator iter; - - if (!biomes.empty()) { - iter = biomes.find(mg->biomemap[mapindex]); - if (iter == biomes.end()) - continue; - } + if (mg->biomemap && !biomes.empty()) { + std::unordered_set<u8>::const_iterator iter = + biomes.find(mg->biomemap[mapindex]); + if (iter == biomes.end()) + continue; } v3s16 pos(x, y, z); |