From c42753338924bb29c61081c9f269772f89bcd808 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Fri, 18 Aug 2017 18:18:25 +0200 Subject: Modernize various files (src/m*) (#6267) * Modernize various files (src/m*) * range-based for loops * code style * C++ headers instead of C headers * Default operators * empty function Thanks to clang-tidy --- src/mapgen_valleys.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mapgen_valleys.cpp') diff --git a/src/mapgen_valleys.cpp b/src/mapgen_valleys.cpp index f0c145934..d8b3193a6 100644 --- a/src/mapgen_valleys.cpp +++ b/src/mapgen_valleys.cpp @@ -435,8 +435,8 @@ int MapgenValleys::getSpawnLevelAtPoint(v2s16 p) if (level_at_point <= water_level || level_at_point > water_level + 32) return MAX_MAP_GENERATION_LIMIT; // Unsuitable spawn point - else - return level_at_point; + + return level_at_point; } @@ -670,7 +670,8 @@ void MapgenValleys::generateCaves(s16 max_stone_y, s16 large_cave_depth) // Saves some time. if (y > terrain + 10) continue; - else if (y < terrain - 40) + + if (y < terrain - 40) underground = true; // Dig massive caves. -- cgit v1.2.3