summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2017-03-19 22:30:47 +0000
committerpeter1138 <peter1138@openttd.org>2017-03-19 22:30:47 +0000
commitf3cbe981561bab44bb5ee83a49ac1fed884e5961 (patch)
tree72fd150e2cdc24ece5a687406432e855d4a508c3 /src
parent3c7dc746d50d44240ba683f91e1f362f01272236 (diff)
downloadopenttd-f3cbe981561bab44bb5ee83a49ac1fed884e5961.tar.xz
(svn r27808) -Codechange: Adjust the size of _track_crosses_trackdirs
_track_crosses_trackdirs is indexed by a Track, not a Trackdir, so adjust its size accordingly. (cirdan)
Diffstat (limited to 'src')
-rw-r--r--src/rail.cpp2
-rw-r--r--src/track_func.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/rail.cpp b/src/rail.cpp
index 79598ec4a..d538064a2 100644
--- a/src/rail.cpp
+++ b/src/rail.cpp
@@ -56,7 +56,7 @@ extern const Trackdir _next_trackdir[TRACKDIR_END] = {
};
/* Maps a trackdir to all trackdirs that make 90 deg turns with it. */
-extern const TrackdirBits _track_crosses_trackdirs[TRACKDIR_END] = {
+extern const TrackdirBits _track_crosses_trackdirs[TRACK_END] = {
TRACKDIR_BIT_Y_SE | TRACKDIR_BIT_Y_NW, // TRACK_X
TRACKDIR_BIT_X_NE | TRACKDIR_BIT_X_SW, // TRACK_Y
TRACKDIR_BIT_RIGHT_N | TRACKDIR_BIT_RIGHT_S | TRACKDIR_BIT_LEFT_N | TRACKDIR_BIT_LEFT_S, // TRACK_UPPER
diff --git a/src/track_func.h b/src/track_func.h
index 689679237..68de827ef 100644
--- a/src/track_func.h
+++ b/src/track_func.h
@@ -594,7 +594,7 @@ static inline TrackdirBits TrackdirReachesTrackdirs(Trackdir trackdir)
static inline TrackdirBits TrackdirCrossesTrackdirs(Trackdir trackdir)
{
assert(IsValidTrackdirForRoadVehicle(trackdir));
- extern const TrackdirBits _track_crosses_trackdirs[TRACKDIR_END];
+ extern const TrackdirBits _track_crosses_trackdirs[TRACK_END];
return _track_crosses_trackdirs[TrackdirToTrack(trackdir)];
}