aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-08-19 09:12:54 +0200
committerLoic Blot <loic.blot@unix-experience.fr>2017-08-19 09:12:54 +0200
commitb5f7249a7edc25077d84b27b38552228b92ff763 (patch)
tree26770c25680cc0aebb9d252f8b9d91f5e07ba78a /src/mapgen.cpp
parente53d8a75360944a494a56269fc328871cb0a60cc (diff)
downloadminetest-b5f7249a7edc25077d84b27b38552228b92ff763.tar.gz
minetest-b5f7249a7edc25077d84b27b38552228b92ff763.tar.bz2
minetest-b5f7249a7edc25077d84b27b38552228b92ff763.zip
Code modernization: src/m* (part 2)
* empty function * default constructor/destructor * remove unused Map::emergeSector(a,b) * for range-based loops * migrate a dirs[7] table to direction tables * remove various old unused function
Diffstat (limited to 'src/mapgen.cpp')
-rw-r--r--src/mapgen.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp
index cec59389d..fe7f74cfa 100644
--- a/src/mapgen.cpp
+++ b/src/mapgen.cpp
@@ -98,11 +98,6 @@ STATIC_ASSERT(
//// Mapgen
////
-Mapgen::Mapgen()
-{
-}
-
-
Mapgen::Mapgen(int mapgenid, MapgenParams *params, EmergeManager *emerge) :
gennotify(emerge->gen_notify_on, &emerge->gen_notify_on_deco_ids)
{
@@ -131,11 +126,6 @@ Mapgen::Mapgen(int mapgenid, MapgenParams *params, EmergeManager *emerge) :
}
-Mapgen::~Mapgen()
-{
-}
-
-
MapgenType Mapgen::getMapgenType(const std::string &mgname)
{
for (size_t i = 0; i != ARRLEN(g_reg_mapgens); i++) {
@@ -283,7 +273,8 @@ s16 Mapgen::findLiquidSurface(v2s16 p2d, s16 ymin, s16 ymax)
MapNode &n = vm->m_data[i];
if (ndef->get(n).walkable)
return -MAX_MAP_GENERATION_LIMIT;
- else if (ndef->get(n).isLiquid())
+
+ if (ndef->get(n).isLiquid())
break;
vm->m_area.add_y(em, i, -1);
@@ -939,11 +930,6 @@ void MapgenBasic::generateDungeons(s16 max_stone_y,
//// GenerateNotifier
////
-GenerateNotifier::GenerateNotifier()
-{
-}
-
-
GenerateNotifier::GenerateNotifier(u32 notify_on,
std::set<u32> *notify_on_deco_ids)
{