Skip to content

Commit 5bef339

Browse files
lupoDharkaelnerzhul
authored andcommittedSep 3, 2017
Use member initialization list instead of the constructor's body (#6371)
* Use member initialization list instead of the constructor's body
1 parent eabf04b commit 5bef339

7 files changed

+73
-73
lines changed
 

‎src/mapgen_carpathian.cpp

+17-17
Original file line numberDiff line numberDiff line change
@@ -106,24 +106,24 @@ MapgenCarpathian::~MapgenCarpathian()
106106
}
107107

108108

109-
MapgenCarpathianParams::MapgenCarpathianParams()
109+
MapgenCarpathianParams::MapgenCarpathianParams():
110+
np_base (12, 1, v3f(2557, 2557, 2557), 6538, 4, 0.8, 0.5),
111+
np_filler_depth (0, 1, v3f(128, 128, 128), 261, 3, 0.7, 2.0),
112+
np_height1 (0, 5, v3f(251, 251, 251), 9613, 5, 0.5, 2.0),
113+
np_height2 (0, 5, v3f(383, 383, 383), 1949, 5, 0.5, 2.0),
114+
np_height3 (0, 5, v3f(509, 509, 509), 3211, 5, 0.5, 2.0),
115+
np_height4 (0, 5, v3f(631, 631, 631), 1583, 5, 0.5, 2.0),
116+
np_hills_terrain (1, 1, v3f(1301, 1301, 1301), 1692, 5, 0.5, 2.0),
117+
np_ridge_terrain (1, 1, v3f(1889, 1889, 1889), 3568, 5, 0.5, 2.0),
118+
np_step_terrain (1, 1, v3f(1889, 1889, 1889), 4157, 5, 0.5, 2.0),
119+
np_hills (0, 3, v3f(257, 257, 257), 6604, 6, 0.5, 2.0),
120+
np_ridge_mnt (0, 12, v3f(743, 743, 743), 5520, 6, 0.7, 2.0),
121+
np_step_mnt (0, 8, v3f(509, 509, 509), 2590, 6, 0.6, 2.0),
122+
np_mnt_var (0, 1, v3f(499, 499, 499), 2490, 5, 0.55, 2.0),
123+
np_cave1 (0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0),
124+
np_cave2 (0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0),
125+
np_cavern (0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0)
110126
{
111-
np_base = NoiseParams(12, 1, v3f(2557, 2557, 2557), 6538, 4, 0.8, 0.5);
112-
np_filler_depth = NoiseParams(0, 1, v3f(128, 128, 128), 261, 3, 0.7, 2.0);
113-
np_height1 = NoiseParams(0, 5, v3f(251, 251, 251), 9613, 5, 0.5, 2.0);
114-
np_height2 = NoiseParams(0, 5, v3f(383, 383, 383), 1949, 5, 0.5, 2.0);
115-
np_height3 = NoiseParams(0, 5, v3f(509, 509, 509), 3211, 5, 0.5, 2.0);
116-
np_height4 = NoiseParams(0, 5, v3f(631, 631, 631), 1583, 5, 0.5, 2.0);
117-
np_hills_terrain = NoiseParams(1, 1, v3f(1301, 1301, 1301), 1692, 5, 0.5, 2.0);
118-
np_ridge_terrain = NoiseParams(1, 1, v3f(1889, 1889, 1889), 3568, 5, 0.5, 2.0);
119-
np_step_terrain = NoiseParams(1, 1, v3f(1889, 1889, 1889), 4157, 5, 0.5, 2.0);
120-
np_hills = NoiseParams(0, 3, v3f(257, 257, 257), 6604, 6, 0.5, 2.0);
121-
np_ridge_mnt = NoiseParams(0, 12, v3f(743, 743, 743), 5520, 6, 0.7, 2.0);
122-
np_step_mnt = NoiseParams(0, 8, v3f(509, 509, 509), 2590, 6, 0.6, 2.0);
123-
np_mnt_var = NoiseParams(0, 1, v3f(499, 499, 499), 2490, 5, 0.55, 2.0);
124-
np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0);
125-
np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0);
126-
np_cavern = NoiseParams(0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0);
127127
}
128128

129129

‎src/mapgen_flat.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ MapgenFlat::~MapgenFlat()
8181
}
8282

8383

84-
MapgenFlatParams::MapgenFlatParams()
84+
MapgenFlatParams::MapgenFlatParams():
85+
np_terrain (0, 1, v3f(600, 600, 600), 7244, 5, 0.6, 2.0),
86+
np_filler_depth (0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0),
87+
np_cave1 (0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0),
88+
np_cave2 (0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0)
8589
{
86-
np_terrain = NoiseParams(0, 1, v3f(600, 600, 600), 7244, 5, 0.6, 2.0);
87-
np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0);
88-
np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0);
89-
np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0);
9090
}
9191

9292

‎src/mapgen_fractal.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ MapgenFractal::~MapgenFractal()
8282
}
8383

8484

85-
MapgenFractalParams::MapgenFractalParams()
85+
MapgenFractalParams::MapgenFractalParams():
86+
np_seabed (-14, 9, v3f(600, 600, 600), 41900, 5, 0.6, 2.0),
87+
np_filler_depth (0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0),
88+
np_cave1 (0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0),
89+
np_cave2 (0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0)
8690
{
87-
np_seabed = NoiseParams(-14, 9, v3f(600, 600, 600), 41900, 5, 0.6, 2.0);
88-
np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0);
89-
np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0);
90-
np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0);
9191
}
9292

9393

‎src/mapgen_v5.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ MapgenV5::~MapgenV5()
8080
}
8181

8282

83-
MapgenV5Params::MapgenV5Params()
83+
MapgenV5Params::MapgenV5Params():
84+
np_filler_depth (0, 1, v3f(150, 150, 150), 261, 4, 0.7, 2.0),
85+
np_factor (0, 1, v3f(250, 250, 250), 920381, 3, 0.45, 2.0),
86+
np_height (0, 10, v3f(250, 250, 250), 84174, 4, 0.5, 2.0),
87+
np_ground (0, 40, v3f(80, 80, 80), 983240, 4, 0.55, 2.0, NOISE_FLAG_EASED),
88+
np_cave1 (0, 12, v3f(50, 50, 50), 52534, 4, 0.5, 2.0),
89+
np_cave2 (0, 12, v3f(50, 50, 50), 10325, 4, 0.5, 2.0),
90+
np_cavern (0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0)
8491
{
85-
np_filler_depth = NoiseParams(0, 1, v3f(150, 150, 150), 261, 4, 0.7, 2.0);
86-
np_factor = NoiseParams(0, 1, v3f(250, 250, 250), 920381, 3, 0.45, 2.0);
87-
np_height = NoiseParams(0, 10, v3f(250, 250, 250), 84174, 4, 0.5, 2.0);
88-
np_ground = NoiseParams(0, 40, v3f(80, 80, 80), 983240, 4, 0.55, 2.0, NOISE_FLAG_EASED);
89-
np_cave1 = NoiseParams(0, 12, v3f(50, 50, 50), 52534, 4, 0.5, 2.0);
90-
np_cave2 = NoiseParams(0, 12, v3f(50, 50, 50), 10325, 4, 0.5, 2.0);
91-
np_cavern = NoiseParams(0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0);
9292
}
9393

9494

‎src/mapgen_v6.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,19 @@ MapgenV6::~MapgenV6()
145145
}
146146

147147

148-
MapgenV6Params::MapgenV6Params()
148+
MapgenV6Params::MapgenV6Params():
149+
np_terrain_base (-4, 20.0, v3f(250.0, 250.0, 250.0), 82341, 5, 0.6, 2.0),
150+
np_terrain_higher (20, 16.0, v3f(500.0, 500.0, 500.0), 85039, 5, 0.6, 2.0),
151+
np_steepness (0.85, 0.5, v3f(125.0, 125.0, 125.0), -932, 5, 0.7, 2.0),
152+
np_height_select (0, 1.0, v3f(250.0, 250.0, 250.0), 4213, 5, 0.69, 2.0),
153+
np_mud (4, 2.0, v3f(200.0, 200.0, 200.0), 91013, 3, 0.55, 2.0),
154+
np_beach (0, 1.0, v3f(250.0, 250.0, 250.0), 59420, 3, 0.50, 2.0),
155+
np_biome (0, 1.0, v3f(500.0, 500.0, 500.0), 9130, 3, 0.50, 2.0),
156+
np_cave (6, 6.0, v3f(250.0, 250.0, 250.0), 34329, 3, 0.50, 2.0),
157+
np_humidity (0.5, 0.5, v3f(500.0, 500.0, 500.0), 72384, 3, 0.50, 2.0),
158+
np_trees (0, 1.0, v3f(125.0, 125.0, 125.0), 2, 4, 0.66, 2.0),
159+
np_apple_trees (0, 1.0, v3f(100.0, 100.0, 100.0), 342902, 3, 0.45, 2.0)
149160
{
150-
np_terrain_base = NoiseParams(-4, 20.0, v3f(250.0, 250.0, 250.0), 82341, 5, 0.6, 2.0);
151-
np_terrain_higher = NoiseParams(20, 16.0, v3f(500.0, 500.0, 500.0), 85039, 5, 0.6, 2.0);
152-
np_steepness = NoiseParams(0.85, 0.5, v3f(125.0, 125.0, 125.0), -932, 5, 0.7, 2.0);
153-
np_height_select = NoiseParams(0, 1.0, v3f(250.0, 250.0, 250.0), 4213, 5, 0.69, 2.0);
154-
np_mud = NoiseParams(4, 2.0, v3f(200.0, 200.0, 200.0), 91013, 3, 0.55, 2.0);
155-
np_beach = NoiseParams(0, 1.0, v3f(250.0, 250.0, 250.0), 59420, 3, 0.50, 2.0);
156-
np_biome = NoiseParams(0, 1.0, v3f(500.0, 500.0, 500.0), 9130, 3, 0.50, 2.0);
157-
np_cave = NoiseParams(6, 6.0, v3f(250.0, 250.0, 250.0), 34329, 3, 0.50, 2.0);
158-
np_humidity = NoiseParams(0.5, 0.5, v3f(500.0, 500.0, 500.0), 72384, 3, 0.50, 2.0);
159-
np_trees = NoiseParams(0, 1.0, v3f(125.0, 125.0, 125.0), 2, 4, 0.66, 2.0);
160-
np_apple_trees = NoiseParams(0, 1.0, v3f(100.0, 100.0, 100.0), 342902, 3, 0.45, 2.0);
161161
}
162162

163163

‎src/mapgen_v7.cpp

+15-15
Original file line numberDiff line numberDiff line change
@@ -128,22 +128,22 @@ MapgenV7::~MapgenV7()
128128
}
129129

130130

131-
MapgenV7Params::MapgenV7Params()
131+
MapgenV7Params::MapgenV7Params():
132+
np_terrain_base (4, 70, v3f(600, 600, 600), 82341, 5, 0.6, 2.0),
133+
np_terrain_alt (4, 25, v3f(600, 600, 600), 5934, 5, 0.6, 2.0),
134+
np_terrain_persist (0.6, 0.1, v3f(2000, 2000, 2000), 539, 3, 0.6, 2.0),
135+
np_height_select (-8, 16, v3f(500, 500, 500), 4213, 6, 0.7, 2.0),
136+
np_filler_depth (0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0),
137+
np_mount_height (256, 112, v3f(1000, 1000, 1000), 72449, 3, 0.6, 2.0),
138+
np_ridge_uwater (0, 1, v3f(1000, 1000, 1000), 85039, 5, 0.6, 2.0),
139+
np_floatland_base (-0.6, 1.5, v3f(600, 600, 600), 114, 5, 0.6, 2.0),
140+
np_float_base_height (48, 24, v3f(300, 300, 300), 907, 4, 0.7, 2.0),
141+
np_mountain (-0.6, 1, v3f(250, 350, 250), 5333, 5, 0.63, 2.0),
142+
np_ridge (0, 1, v3f(100, 100, 100), 6467, 4, 0.75, 2.0),
143+
np_cavern (0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0),
144+
np_cave1 (0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0),
145+
np_cave2 (0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0)
132146
{
133-
np_terrain_base = NoiseParams(4, 70, v3f(600, 600, 600), 82341, 5, 0.6, 2.0);
134-
np_terrain_alt = NoiseParams(4, 25, v3f(600, 600, 600), 5934, 5, 0.6, 2.0);
135-
np_terrain_persist = NoiseParams(0.6, 0.1, v3f(2000, 2000, 2000), 539, 3, 0.6, 2.0);
136-
np_height_select = NoiseParams(-8, 16, v3f(500, 500, 500), 4213, 6, 0.7, 2.0);
137-
np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0);
138-
np_mount_height = NoiseParams(256, 112, v3f(1000, 1000, 1000), 72449, 3, 0.6, 2.0);
139-
np_ridge_uwater = NoiseParams(0, 1, v3f(1000, 1000, 1000), 85039, 5, 0.6, 2.0);
140-
np_floatland_base = NoiseParams(-0.6, 1.5, v3f(600, 600, 600), 114, 5, 0.6, 2.0);
141-
np_float_base_height = NoiseParams(48, 24, v3f(300, 300, 300), 907, 4, 0.7, 2.0);
142-
np_mountain = NoiseParams(-0.6, 1, v3f(250, 350, 250), 5333, 5, 0.63, 2.0);
143-
np_ridge = NoiseParams(0, 1, v3f(100, 100, 100), 6467, 4, 0.75, 2.0);
144-
np_cavern = NoiseParams(0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0);
145-
np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0);
146-
np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0);
147147
}
148148

149149

‎src/mapgen_valleys.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,18 @@ MapgenValleys::~MapgenValleys()
124124
}
125125

126126

127-
MapgenValleysParams::MapgenValleysParams()
127+
MapgenValleysParams::MapgenValleysParams():
128+
np_cave1 (0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0),
129+
np_cave2 (0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0),
130+
np_filler_depth (0.f, 1.2f, v3f(256, 256, 256), 1605, 3, 0.5f, 2.f),
131+
np_inter_valley_fill (0.f, 1.f, v3f(256, 512, 256), 1993, 6, 0.8f, 2.f),
132+
np_inter_valley_slope (0.5f, 0.5f, v3f(128, 128, 128), 746, 1, 1.f, 2.f),
133+
np_rivers (0.f, 1.f, v3f(256, 256, 256), -6050, 5, 0.6f, 2.f),
134+
np_massive_caves (0.f, 1.f, v3f(768, 256, 768), 59033, 6, 0.63f, 2.f),
135+
np_terrain_height (-10.f, 50.f, v3f(1024, 1024, 1024), 5202, 6, 0.4f, 2.f),
136+
np_valley_depth (5.f, 4.f, v3f(512, 512, 512), -1914, 1, 1.f, 2.f),
137+
np_valley_profile (0.6f, 0.5f, v3f(512, 512, 512), 777, 1, 1.f, 2.f)
128138
{
129-
np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0);
130-
np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0);
131-
np_filler_depth = NoiseParams(0.f, 1.2f, v3f(256, 256, 256), 1605, 3, 0.5f, 2.f);
132-
np_inter_valley_fill = NoiseParams(0.f, 1.f, v3f(256, 512, 256), 1993, 6, 0.8f, 2.f);
133-
np_inter_valley_slope = NoiseParams(0.5f, 0.5f, v3f(128, 128, 128), 746, 1, 1.f, 2.f);
134-
np_rivers = NoiseParams(0.f, 1.f, v3f(256, 256, 256), -6050, 5, 0.6f, 2.f);
135-
np_massive_caves = NoiseParams(0.f, 1.f, v3f(768, 256, 768), 59033, 6, 0.63f, 2.f);
136-
np_terrain_height = NoiseParams(-10.f, 50.f, v3f(1024, 1024, 1024), 5202, 6, 0.4f, 2.f);
137-
np_valley_depth = NoiseParams(5.f, 4.f, v3f(512, 512, 512), -1914, 1, 1.f, 2.f);
138-
np_valley_profile = NoiseParams(0.6f, 0.5f, v3f(512, 512, 512), 777, 1, 1.f, 2.f);
139139
}
140140

141141

0 commit comments

Comments
 (0)
Please sign in to comment.