(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)
This commit is contained in:
peter1138 2017-03-19 22:30:47 +00:00
parent 80303515c1
commit e3a1ae2be5
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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)];
}