From 67a4cb7d8a4461fe7d5206189fd4e9539beb20b7 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Tue, 3 Apr 2018 18:16:17 +0200 Subject: Fix various clang-tidy reported performance-type-promotion-in-math-fn --- src/mapgen/mapgen_valleys.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mapgen/mapgen_valleys.cpp') diff --git a/src/mapgen/mapgen_valleys.cpp b/src/mapgen/mapgen_valleys.cpp index 54643583b..bef4629a8 100644 --- a/src/mapgen/mapgen_valleys.cpp +++ b/src/mapgen/mapgen_valleys.cpp @@ -433,7 +433,7 @@ int MapgenValleys::getSpawnLevelAtPoint(v2s16 p) { // Check to make sure this isn't a request for a location in a river. float rivers = NoisePerlin2D(&noise_rivers->np, p.X, p.Y, seed); - if (fabs(rivers) < river_size_factor) + if (std::fabs(rivers) < river_size_factor) return MAX_MAP_GENERATION_LIMIT; // Unsuitable spawn point s16 level_at_point = terrainLevelAtPoint(p.X, p.Y); -- cgit v1.2.3