diff options
author | rubidium <rubidium@openttd.org> | 2014-10-12 11:53:13 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-10-12 11:53:13 +0000 |
commit | b0c4a16e9d513bfb54cda8ced5c7ee176290741a (patch) | |
tree | 92138709dd1767354ff8bcae4c341ec717d3fba9 /src | |
parent | df5d5e2b8b242d8c145a32560504979dc01055eb (diff) | |
download | openttd-b0c4a16e9d513bfb54cda8ced5c7ee176290741a.tar.xz |
(svn r27000) -Fix (r26999): compilation error with some versions of GCC
Diffstat (limited to 'src')
-rw-r--r-- | src/tgp.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tgp.cpp b/src/tgp.cpp index a918a0d7d..7ee2f6e92 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -505,7 +505,7 @@ static void HeightMapCurves(uint level) height_t y; ///< The height to scale to. }; /* Scaled curve maps; value is in height_ts. */ -#define F(fraction) (fraction * mh * I2H(1)) +#define F(fraction) ((height_t)(fraction * mh * I2H(1))) const control_point_t curve_map_1[] = { { F(0.0), F(0.0) }, { F(0.6 / 3), F(0.1) }, { F(2.4 / 3), F(0.4 / 3) }, { F(1.0), F(0.4) } }; const control_point_t curve_map_2[] = { { F(0.0), F(0.0) }, { F(0.2 / 3), F(0.1) }, { F(1.6 / 3), F(0.4 / 3) }, { F(2.4 / 3), F(0.8 / 3) }, { F(1.0), F(0.6) } }; const control_point_t curve_map_3[] = { { F(0.0), F(0.0) }, { F(0.2 / 3), F(0.1) }, { F(1.6 / 3), F(0.8 / 3) }, { F(2.4 / 3), F(1.8 / 3) }, { F(1.0), F(0.8) } }; |