From aa94a275c603e7e8bd65cf1b7440017217a86c17 Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Thu, 9 Jul 2015 11:15:37 -0600 Subject: Fixes compilation failures on MacOSX 10.10 * Replace old c-style casts with c++ casts * Added `-Wno-error=old-style-cast` to Protocol18x.cpp --- src/Generating/IntGen.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Generating/IntGen.h') diff --git a/src/Generating/IntGen.h b/src/Generating/IntGen.h index 9cc881639..3f94ec3d0 100644 --- a/src/Generating/IntGen.h +++ b/src/Generating/IntGen.h @@ -754,7 +754,7 @@ public: int IdxZ = z * SizeX; for (int x = 0; x < SizeX; x++) { - size_t val = (size_t)a_Values[x + IdxZ]; + size_t val = static_cast(a_Values[x + IdxZ]); const cBiomesInGroups & Biomes = (val > bgfRare) ? rareBiomesInGroups[(val & (bgfRare - 1)) % ARRAYCOUNT(rareBiomesInGroups)] : biomesInGroups[val % ARRAYCOUNT(biomesInGroups)]; @@ -891,7 +891,7 @@ public: } // There's a river, change the output to a river or a frozen river, based on the original biome: - if (IsBiomeVeryCold((EMCSBiome)a_Values[idx])) + if (IsBiomeVeryCold(static_cast(a_Values[idx]))) { a_Values[idx] = biFrozenRiver; } -- cgit v1.2.3