diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-08-18 18:18:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-18 18:18:25 +0200 |
commit | c42753338924bb29c61081c9f269772f89bcd808 (patch) | |
tree | 3ccbf49ad802c57a1288ea978268315b68d8e65f /src/mapgen_v7.cpp | |
parent | fb196be8cf8606cfab144e2fe62d9c9d1f50932f (diff) | |
download | minetest-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_v7.cpp')
-rw-r--r-- | src/mapgen_v7.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp index 3ce22dbb1..d27e339ce 100644 --- a/src/mapgen_v7.cpp +++ b/src/mapgen_v7.cpp @@ -240,9 +240,9 @@ int MapgenV7::getSpawnLevelAtPoint(v2s16 p) if (!(spflags & MGV7_MOUNTAINS)) { if (y < water_level || y > max_spawn_y) return MAX_MAP_GENERATION_LIMIT; // Unsuitable spawn point - else - // y + 2 because y is surface level and due to biome 'dust' - return y + 2; + + // y + 2 because y is surface level and due to biome 'dust' + return y + 2; } // Search upwards for first node without mountain terrain @@ -251,9 +251,9 @@ int MapgenV7::getSpawnLevelAtPoint(v2s16 p) if (!getMountainTerrainAtPoint(p.X, y + 1, p.Y)) { if (y <= water_level || y > max_spawn_y) return MAX_MAP_GENERATION_LIMIT; // Unsuitable spawn point - else - // y + 1 due to biome 'dust' - return y + 1; + + // y + 1 due to biome 'dust' + return y + 1; } y++; iters--; |