summaryrefslogtreecommitdiffstats
path: root/src/Generating/ComposableGenerator.cpp
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-08-12 17:40:51 +0200
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-08-12 17:40:51 +0200
commitcdcc5fe9a7894af6075865f698e3d014a6f92335 (patch)
treeab1b84a09987f8ebe9d1e8450f36375c0f9bc5db /src/Generating/ComposableGenerator.cpp
parentMerge pull request #2425 from cuberite/APIDumpNameChange (diff)
parentFix old style casts and implicit conversions (diff)
downloadcuberite-cdcc5fe9a7894af6075865f698e3d014a6f92335.tar
cuberite-cdcc5fe9a7894af6075865f698e3d014a6f92335.tar.gz
cuberite-cdcc5fe9a7894af6075865f698e3d014a6f92335.tar.bz2
cuberite-cdcc5fe9a7894af6075865f698e3d014a6f92335.tar.lz
cuberite-cdcc5fe9a7894af6075865f698e3d014a6f92335.tar.xz
cuberite-cdcc5fe9a7894af6075865f698e3d014a6f92335.tar.zst
cuberite-cdcc5fe9a7894af6075865f698e3d014a6f92335.zip
Diffstat (limited to 'src/Generating/ComposableGenerator.cpp')
-rw-r--r--src/Generating/ComposableGenerator.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp
index 4eee8b707..eb1d0e1ee 100644
--- a/src/Generating/ComposableGenerator.cpp
+++ b/src/Generating/ComposableGenerator.cpp
@@ -336,7 +336,7 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
}
else if (NoCaseCompare(*itr, "DualRidgeCaves") == 0)
{
- float Threshold = (float)a_IniFile.GetValueSetF("Generator", "DualRidgeCavesThreshold", 0.3);
+ float Threshold = static_cast<float>(a_IniFile.GetValueSetF("Generator", "DualRidgeCavesThreshold", 0.3));
m_FinishGens.push_back(cFinishGenPtr(new cStructGenDualRidgeCaves(Seed, Threshold)));
}
else if (NoCaseCompare(*itr, "DungeonRooms") == 0)
@@ -569,12 +569,18 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
double MinCeilingHeightCenter = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinCeilingHeightCenter", 36);
m_FinishGens.push_back(cFinishGenPtr(new cRoughRavines(
Seed, MaxSize, MinSize,
- (float)MaxCenterWidth, (float)MinCenterWidth,
- (float)MaxRoughness, (float)MinRoughness,
- (float)MaxFloorHeightEdge, (float)MinFloorHeightEdge,
- (float)MaxFloorHeightCenter, (float)MinFloorHeightCenter,
- (float)MaxCeilingHeightEdge, (float)MinCeilingHeightEdge,
- (float)MaxCeilingHeightCenter, (float)MinCeilingHeightCenter,
+ static_cast<float>(MaxCenterWidth),
+ static_cast<float>(MinCenterWidth),
+ static_cast<float>(MaxRoughness),
+ static_cast<float>(MinRoughness),
+ static_cast<float>(MaxFloorHeightEdge),
+ static_cast<float>(MinFloorHeightEdge),
+ static_cast<float>(MaxFloorHeightCenter),
+ static_cast<float>(MinFloorHeightCenter),
+ static_cast<float>(MaxCeilingHeightEdge),
+ static_cast<float>(MinCeilingHeightEdge),
+ static_cast<float>(MaxCeilingHeightCenter),
+ static_cast<float>(MinCeilingHeightCenter),
GridSize, MaxOffset
)));
}