summaryrefslogtreecommitdiff
path: root/src/mapgen/dungeongen.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2018-04-02 23:51:08 +0200
committerGitHub <noreply@github.com>2018-04-02 23:51:08 +0200
commit2481ea27ce0f423f3e6f3522539d20e1500cf572 (patch)
tree73251dcbf9146d7499177f59b266d8c60b0eaae7 /src/mapgen/dungeongen.cpp
parente98fd934ce17a7af0b4629fc88158373303c88a0 (diff)
downloadminetest-2481ea27ce0f423f3e6f3522539d20e1500cf572.tar.gz
minetest-2481ea27ce0f423f3e6f3522539d20e1500cf572.tar.bz2
minetest-2481ea27ce0f423f3e6f3522539d20e1500cf572.zip
Fix many issues reported by clang-tidy (#7189)
* Fix many issues reported by clang-tidy We have many issues in code related to some performance to float <-> double. Clang-tidy reported it in performance-type-promotion-in-math-fn I fixed many of them. It's not ready for a promote to blocking Also fix some value which should be const-ref
Diffstat (limited to 'src/mapgen/dungeongen.cpp')
-rw-r--r--src/mapgen/dungeongen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mapgen/dungeongen.cpp b/src/mapgen/dungeongen.cpp
index b5d7ec7ad..a4e8c74dc 100644
--- a/src/mapgen/dungeongen.cpp
+++ b/src/mapgen/dungeongen.cpp
@@ -19,6 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "dungeongen.h"
+#include <cmath>
#include "mapgen.h"
#include "voxel.h"
#include "noise.h"
@@ -121,7 +122,7 @@ void DungeonGen::generate(MMVManip *vm, u32 bseed, v3s16 nmin, v3s16 nmax)
}
// Add them
- for (u32 i = 0; i < floor(nval_density); i++)
+ for (u32 i = 0; i < std::floor(nval_density); i++)
makeDungeon(v3s16(1, 1, 1) * MAP_BLOCKSIZE);
// Optionally convert some structure to alternative structure