summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-07-04 09:41:35 +0000
committerpeter1138 <peter1138@openttd.org>2007-07-04 09:41:35 +0000
commit0645454aaa08c1e324cb119639f916a5679c1c3a (patch)
tree8a4a76f7e9a988b24466744c31c4aea37a93c1b5 /src
parente9c38a97b089e2ba3aea32ea07a4ea6d85768348 (diff)
downloadopenttd-0645454aaa08c1e324cb119639f916a5679c1c3a.tar.xz
(svn r10431) -Codechange: constness on static array
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_station.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp
index bbaaf8246..95b9c574a 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -291,18 +291,18 @@ static uint32 GetPlatformInfoHelper(TileIndex tile, bool check_type, bool check_
static uint32 GetRailContinuationInfo(TileIndex tile)
{
/* Tile offsets and exit dirs for X axis */
- static Direction x_dir[8] = { DIR_SW, DIR_NE, DIR_SE, DIR_NW, DIR_S, DIR_E, DIR_W, DIR_N };
- static DiagDirection x_exits[8] = { DIAGDIR_SW, DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_NW, DIAGDIR_SW, DIAGDIR_NE, DIAGDIR_SW, DIAGDIR_NE };
+ static const Direction x_dir[8] = { DIR_SW, DIR_NE, DIR_SE, DIR_NW, DIR_S, DIR_E, DIR_W, DIR_N };
+ static const DiagDirection x_exits[8] = { DIAGDIR_SW, DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_NW, DIAGDIR_SW, DIAGDIR_NE, DIAGDIR_SW, DIAGDIR_NE };
/* Tile offsets and exit dirs for Y axis */
- static Direction y_dir[8] = { DIR_SE, DIR_NW, DIR_SW, DIR_NE, DIR_S, DIR_W, DIR_E, DIR_N };
- static DiagDirection y_exits[8] = { DIAGDIR_SE, DIAGDIR_NW, DIAGDIR_SW, DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_NW, DIAGDIR_SE, DIAGDIR_NW };
+ static const Direction y_dir[8] = { DIR_SE, DIR_NW, DIR_SW, DIR_NE, DIR_S, DIR_W, DIR_E, DIR_N };
+ static const DiagDirection y_exits[8] = { DIAGDIR_SE, DIAGDIR_NW, DIAGDIR_SW, DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_NW, DIAGDIR_SE, DIAGDIR_NW };
Axis axis = IsTileType(tile, MP_RAILWAY) ? GetWaypointAxis(tile) : GetRailStationAxis(tile);
/* Choose appropriate lookup table to use */
- Direction *dir = axis == AXIS_X ? x_dir : y_dir;
- DiagDirection *diagdir = axis == AXIS_X ? x_exits : y_exits;
+ const Direction *dir = axis == AXIS_X ? x_dir : y_dir;
+ const DiagDirection *diagdir = axis == AXIS_X ? x_exits : y_exits;
uint32 res = 0;
uint i;