Mapgen: Remove unnecessary 'this->' from constructors (#6069)
authorParamat <paramat@users.noreply.github.com>
Fri, 30 Jun 2017 13:32:35 +0000 (14:32 +0100)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Fri, 30 Jun 2017 13:32:35 +0000 (15:32 +0200)
src/mapgen_flat.cpp
src/mapgen_fractal.cpp
src/mapgen_v5.cpp
src/mapgen_v6.cpp
src/mapgen_v7.cpp
src/mapgen_valleys.cpp

index e7f5f4dfebd4006246802c7f2df43075e7957857..95fb3541258d13f4474f1e9e50191a22e7636f14 100644 (file)
@@ -51,15 +51,15 @@ FlagDesc flagdesc_mapgen_flat[] = {
 MapgenFlat::MapgenFlat(int mapgenid, MapgenFlatParams *params, EmergeManager *emerge)
        : MapgenBasic(mapgenid, params, emerge)
 {
-       this->spflags          = params->spflags;
-       this->ground_level     = params->ground_level;
-       this->large_cave_depth = params->large_cave_depth;
-       this->lava_depth       = params->lava_depth;
-       this->cave_width       = params->cave_width;
-       this->lake_threshold   = params->lake_threshold;
-       this->lake_steepness   = params->lake_steepness;
-       this->hill_threshold   = params->hill_threshold;
-       this->hill_steepness   = params->hill_steepness;
+       spflags          = params->spflags;
+       ground_level     = params->ground_level;
+       large_cave_depth = params->large_cave_depth;
+       lava_depth       = params->lava_depth;
+       cave_width       = params->cave_width;
+       lake_threshold   = params->lake_threshold;
+       lake_steepness   = params->lake_steepness;
+       hill_threshold   = params->hill_threshold;
+       hill_steepness   = params->hill_steepness;
 
        // 2D noise
        noise_filler_depth = new Noise(&params->np_filler_depth, seed, csize.X, csize.Z);
index b43dcd3f0acef373845f1e314ebcc1d3d11c05e0..4fe0d836968d29e910b67b65dd79c2bd86458d0e 100644 (file)
@@ -49,19 +49,19 @@ FlagDesc flagdesc_mapgen_fractal[] = {
 MapgenFractal::MapgenFractal(int mapgenid, MapgenFractalParams *params, EmergeManager *emerge)
        : MapgenBasic(mapgenid, params, emerge)
 {
-       this->spflags          = params->spflags;
-       this->cave_width       = params->cave_width;
-       this->large_cave_depth = params->large_cave_depth;
-       this->lava_depth       = params->lava_depth;
-       this->fractal          = params->fractal;
-       this->iterations       = params->iterations;
-       this->scale            = params->scale;
-       this->offset           = params->offset;
-       this->slice_w          = params->slice_w;
-       this->julia_x          = params->julia_x;
-       this->julia_y          = params->julia_y;
-       this->julia_z          = params->julia_z;
-       this->julia_w          = params->julia_w;
+       spflags          = params->spflags;
+       cave_width       = params->cave_width;
+       large_cave_depth = params->large_cave_depth;
+       lava_depth       = params->lava_depth;
+       fractal          = params->fractal;
+       iterations       = params->iterations;
+       scale            = params->scale;
+       offset           = params->offset;
+       slice_w          = params->slice_w;
+       julia_x          = params->julia_x;
+       julia_y          = params->julia_y;
+       julia_z          = params->julia_z;
+       julia_w          = params->julia_w;
 
        //// 2D terrain noise
        noise_seabed       = new Noise(&params->np_seabed, seed, csize.X, csize.Z);
@@ -70,8 +70,8 @@ MapgenFractal::MapgenFractal(int mapgenid, MapgenFractalParams *params, EmergeMa
        MapgenBasic::np_cave1 = params->np_cave1;
        MapgenBasic::np_cave2 = params->np_cave2;
 
-       this->formula = fractal / 2 + fractal % 2;
-       this->julia   = fractal % 2 == 0;
+       formula = fractal / 2 + fractal % 2;
+       julia   = fractal % 2 == 0;
 }
 
 
index 044826705ade51b02078f95ab34009f4b7898574..ffa1f538c4fa61da4ba2eb91345583e7d9d0432a 100644 (file)
@@ -48,13 +48,13 @@ FlagDesc flagdesc_mapgen_v5[] = {
 MapgenV5::MapgenV5(int mapgenid, MapgenV5Params *params, EmergeManager *emerge)
        : MapgenBasic(mapgenid, params, emerge)
 {
-       this->spflags          = params->spflags;
-       this->cave_width       = params->cave_width;
-       this->large_cave_depth = params->large_cave_depth;
-       this->lava_depth       = params->lava_depth;
-       this->cavern_limit     = params->cavern_limit;
-       this->cavern_taper     = params->cavern_taper;
-       this->cavern_threshold = params->cavern_threshold;
+       spflags          = params->spflags;
+       cave_width       = params->cave_width;
+       large_cave_depth = params->large_cave_depth;
+       lava_depth       = params->lava_depth;
+       cavern_limit     = params->cavern_limit;
+       cavern_taper     = params->cavern_taper;
+       cavern_threshold = params->cavern_threshold;
 
        // Terrain noise
        noise_filler_depth = new Noise(&params->np_filler_depth, seed, csize.X, csize.Z);
index f932f45f7e3472a2cc5bd9eb910185ad57fb01e6..ebbd932d4de88d39526bbcf7a5b790a85bfe89fd 100644 (file)
@@ -58,14 +58,14 @@ FlagDesc flagdesc_mapgen_v6[] = {
 MapgenV6::MapgenV6(int mapgenid, MapgenV6Params *params, EmergeManager *emerge)
        : Mapgen(mapgenid, params, emerge)
 {
-       this->m_emerge = emerge;
-       this->ystride = csize.X; //////fix this
+       m_emerge = emerge;
+       ystride = csize.X; //////fix this
 
-       this->heightmap = new s16[csize.X * csize.Z];
+       heightmap = new s16[csize.X * csize.Z];
 
-       this->spflags     = params->spflags;
-       this->freq_desert = params->freq_desert;
-       this->freq_beach  = params->freq_beach;
+       spflags     = params->spflags;
+       freq_desert = params->freq_desert;
+       freq_beach  = params->freq_beach;
 
        np_cave        = &params->np_cave;
        np_humidity    = &params->np_humidity;
index e361a8f12a4479094a044ee26b9712b5a78ca7c6..17f2df835ca703078834e9ee053fe6209ba72883 100644 (file)
@@ -54,21 +54,21 @@ FlagDesc flagdesc_mapgen_v7[] = {
 MapgenV7::MapgenV7(int mapgenid, MapgenV7Params *params, EmergeManager *emerge)
        : MapgenBasic(mapgenid, params, emerge)
 {
-       this->spflags             = params->spflags;
-       this->cave_width          = params->cave_width;
-       this->large_cave_depth    = params->large_cave_depth;
-       this->lava_depth          = params->lava_depth;
-       this->float_mount_density = params->float_mount_density;
-       this->floatland_level     = params->floatland_level;
-       this->shadow_limit        = params->shadow_limit;
-       this->cavern_limit        = params->cavern_limit;
-       this->cavern_taper        = params->cavern_taper;
-       this->cavern_threshold    = params->cavern_threshold;
+       spflags             = params->spflags;
+       cave_width          = params->cave_width;
+       large_cave_depth    = params->large_cave_depth;
+       lava_depth          = params->lava_depth;
+       float_mount_density = params->float_mount_density;
+       floatland_level     = params->floatland_level;
+       shadow_limit        = params->shadow_limit;
+       cavern_limit        = params->cavern_limit;
+       cavern_taper        = params->cavern_taper;
+       cavern_threshold    = params->cavern_threshold;
 
        // This is to avoid a divide-by-zero.
        // Parameter will be saved to map_meta.txt in limited form.
        params->float_mount_height = MYMAX(params->float_mount_height, 1.0f);
-       this->float_mount_height   = params->float_mount_height;
+       float_mount_height   = params->float_mount_height;
 
        // 2D noise
        noise_terrain_base    = new Noise(&params->np_terrain_base,    seed, csize.X, csize.Z);
index cf982206ba44a5ed73c4e3d372f44e1b44c8b906..71c0b001f71b0bffa7f14194727020b6c160e74d 100644 (file)
@@ -66,19 +66,19 @@ MapgenValleys::MapgenValleys(int mapgenid, MapgenValleysParams *params, EmergeMa
        : MapgenBasic(mapgenid, params, emerge)
 {
        // NOTE: MapgenValleys has a hard dependency on BiomeGenOriginal
-       this->m_bgen = (BiomeGenOriginal *)biomegen;
+       m_bgen = (BiomeGenOriginal *)biomegen;
 
        BiomeParamsOriginal *bp = (BiomeParamsOriginal *)params->bparams;
 
-       this->spflags            = params->spflags;
-       this->altitude_chill     = params->altitude_chill;
-       this->large_cave_depth   = params->large_cave_depth;
-       this->lava_features_lim  = rangelim(params->lava_features, 0, 10);
-       this->massive_cave_depth = params->massive_cave_depth;
-       this->river_depth_bed    = params->river_depth + 1.f;
-       this->river_size_factor  = params->river_size / 100.f;
-       this->water_features_lim = rangelim(params->water_features, 0, 10);
-       this->cave_width         = params->cave_width;
+       spflags            = params->spflags;
+       altitude_chill     = params->altitude_chill;
+       large_cave_depth   = params->large_cave_depth;
+       lava_features_lim  = rangelim(params->lava_features, 0, 10);
+       massive_cave_depth = params->massive_cave_depth;
+       river_depth_bed    = params->river_depth + 1.f;
+       river_size_factor  = params->river_size / 100.f;
+       water_features_lim = rangelim(params->water_features, 0, 10);
+       cave_width         = params->cave_width;
 
        //// 2D Terrain noise
        noise_filler_depth       = new Noise(&params->np_filler_depth,       seed, csize.X, csize.Z);
@@ -96,13 +96,13 @@ MapgenValleys::MapgenValleys(int mapgenid, MapgenValleysParams *params, EmergeMa
        noise_cave2             = new Noise(&params->np_cave2,             seed, csize.X, csize.Y + 1, csize.Z);
        noise_massive_caves     = new Noise(&params->np_massive_caves,     seed, csize.X, csize.Y + 1, csize.Z);
 
-       this->humid_rivers       = (spflags & MGVALLEYS_HUMID_RIVERS);
-       this->use_altitude_chill = (spflags & MGVALLEYS_ALT_CHILL);
-       this->humidity_adjust    = bp->np_humidity.offset - 50.f;
+       humid_rivers       = (spflags & MGVALLEYS_HUMID_RIVERS);
+       use_altitude_chill = (spflags & MGVALLEYS_ALT_CHILL);
+       humidity_adjust    = bp->np_humidity.offset - 50.f;
 
        // a small chance of overflows if the settings are very high
-       this->cave_water_max_height = water_level + MYMAX(0, water_features_lim - 4) * 50;
-       this->lava_max_height       = water_level + MYMAX(0, lava_features_lim - 4) * 50;
+       cave_water_max_height = water_level + MYMAX(0, water_features_lim - 4) * 50;
+       lava_max_height       = water_level + MYMAX(0, lava_features_lim - 4) * 50;
 
        tcave_cache = new float[csize.Y + 2];
 }