summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2018-02-05 00:07:12 +0100
committerGitHub <noreply@github.com>2018-02-05 00:07:12 +0100
commitd3c1c626f569e5aa58085425924cca45927b6199 (patch)
treec65dee850358467c9afebdd37fcd4f6fb95a475a /src/World.cpp
parentcChunk and cChunkData: Use vectors for block get and set functions (#4172) (diff)
downloadcuberite-d3c1c626f569e5aa58085425924cca45927b6199.tar
cuberite-d3c1c626f569e5aa58085425924cca45927b6199.tar.gz
cuberite-d3c1c626f569e5aa58085425924cca45927b6199.tar.bz2
cuberite-d3c1c626f569e5aa58085425924cca45927b6199.tar.lz
cuberite-d3c1c626f569e5aa58085425924cca45927b6199.tar.xz
cuberite-d3c1c626f569e5aa58085425924cca45927b6199.tar.zst
cuberite-d3c1c626f569e5aa58085425924cca45927b6199.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 6c806ec6e..1b7bc8643 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -492,11 +492,7 @@ int cWorld::GetDefaultWeatherInterval(eWeather a_Weather)
return Random.RandInt(m_MinThunderStormTicks, m_MaxThunderStormTicks);
}
}
-
- #ifndef __clang__
- ASSERT(!"Unknown weather");
- return -1;
- #endif
+ UNREACHABLE("Unsupported weather");
}
@@ -851,19 +847,17 @@ eWeather cWorld::ChooseNewWeather()
switch (m_Weather)
{
case eWeather_Sunny:
- case eWeather_ThunderStorm: return eWeather_Rain;
-
+ case eWeather_ThunderStorm:
+ {
+ return eWeather_Rain;
+ }
case eWeather_Rain:
{
// 1 / 8 chance of turning into a thunderstorm
return GetRandomProvider().RandBool(0.125) ? eWeather_ThunderStorm : eWeather_Sunny;
}
}
-
- #ifndef __clang__
- ASSERT(!"Unknown weather");
- return eWeather_Sunny;
- #endif
+ UNREACHABLE("Unsupported weather");
}