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_flat.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mapgen_flat.cpp') diff --git a/src/mapgen_flat.cpp b/src/mapgen_flat.cpp index 34074c8b7..0343492d8 100644 --- a/src/mapgen_flat.cpp +++ b/src/mapgen_flat.cpp @@ -148,10 +148,11 @@ int MapgenFlat::getSpawnLevelAtPoint(v2s16 p) if (ground_level < water_level) // Ocean world, allow spawn in water return MYMAX(level_at_point, water_level); - else if (level_at_point > water_level) + + if (level_at_point > water_level) return level_at_point; // Spawn on land - else - return MAX_MAP_GENERATION_LIMIT; // Unsuitable spawn point + + return MAX_MAP_GENERATION_LIMIT; // Unsuitable spawn point } -- cgit v1.2.3