]> git.lizzy.rs Git - minetest.git/blobdiff - src/mg_decoration.cpp
make ret variable in /builtin/mainmenu/tab_credits.lua local (#5942)
[minetest.git] / src / mg_decoration.cpp
index ec31a9c0184b1680e42cb0052facb6110af7fa0e..1a469cd9ca24fa026dd289ac5fc630878d7a2c7f 100644 (file)
@@ -1,6 +1,7 @@
 /*
 Minetest
-Copyright (C) 2010-2014 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
+Copyright (C) 2014-2016 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
+Copyright (C) 2015-2017 paramat
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
@@ -207,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);