From 2b8bb12d623a64897636234ed3c508517a1a2ba6 Mon Sep 17 00:00:00 2001 From: michi_cc Date: Mon, 10 Aug 2015 20:24:13 +0000 Subject: (svn r27381) -Fix: Warnings due to C++11 requirements for explicit narrowing conversions in initializer lists. --- src/script/api/script_road.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/script/api') 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; -- cgit v1.2.3-70-g09d2