summaryrefslogtreecommitdiff
path: root/src/mapgen_valleys.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-18 18:18:25 +0200
committerGitHub <noreply@github.com>2017-08-18 18:18:25 +0200
commitc42753338924bb29c61081c9f269772f89bcd808 (patch)
tree3ccbf49ad802c57a1288ea978268315b68d8e65f /src/mapgen_valleys.cpp
parentfb196be8cf8606cfab144e2fe62d9c9d1f50932f (diff)
downloadminetest-c42753338924bb29c61081c9f269772f89bcd808.tar.gz
minetest-c42753338924bb29c61081c9f269772f89bcd808.tar.bz2
minetest-c42753338924bb29c61081c9f269772f89bcd808.zip
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
Diffstat (limited to 'src/mapgen_valleys.cpp')
-rw-r--r--src/mapgen_valleys.cpp7
1 files changed, 4 insertions, 3 deletions
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.