summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2015-08-10 20:24:13 +0000
committermichi_cc <michi_cc@openttd.org>2015-08-10 20:24:13 +0000
commit2b8bb12d623a64897636234ed3c508517a1a2ba6 (patch)
tree015abed42269cf73bb83b2f92b029084735d82cd /src/script
parent35b77450f80580da2aa7f087aa2a1631b92ebd62 (diff)
downloadopenttd-2b8bb12d623a64897636234ed3c508517a1a2ba6.tar.xz
(svn r27381) -Fix: Warnings due to C++11 requirements for explicit narrowing conversions in initializer lists.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/script_road.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/script_road.cpp b/src/script/api/script_road.cpp
index 3a9a8ca3f..3dd1453b6 100644
--- a/src/script/api/script_road.cpp
+++ b/src/script/api/script_road.cpp
@@ -371,8 +371,8 @@ static bool NormaliseTileOffset(int32 *tile)
if (!::IsValidTile(tile) || !::IsValidTile(start) || !::IsValidTile(end)) return -1;
if (::DistanceManhattan(tile, start) != 1 || ::DistanceManhattan(tile, end) != 1) return -1;
- /* ROAD_NW ROAD_SW ROAD_SE ROAD_NE */
- static const TileIndex neighbours[] = {::TileDiffXY(0, -1), ::TileDiffXY(1, 0), ::TileDiffXY(0, 1), ::TileDiffXY(-1, 0)};
+ /* ROAD_NW ROAD_SW ROAD_SE ROAD_NE */
+ static const TileIndexDiff neighbours[] = {::TileDiffXY(0, -1), ::TileDiffXY(1, 0), ::TileDiffXY(0, 1), ::TileDiffXY(-1, 0)};
Array *existing = (Array*)alloca(sizeof(Array) + lengthof(neighbours) * sizeof(int32));
existing->size = 0;