diff options
author | tron <tron@openttd.org> | 2006-04-11 04:49:23 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-04-11 04:49:23 +0000 |
commit | d38964e49ab78612bbf44b876c7da6dee789b377 (patch) | |
tree | 62175ff0bb6a140ba8d6ba493f020541ea148b4a /rail.h | |
parent | f1da549c10f8e2d2207f1b6325a86b0210a28b5e (diff) | |
download | openttd-d38964e49ab78612bbf44b876c7da6dee789b377.tar.xz |
(svn r4351) Simplify ReverseTrackdir() to use a simple arithmetic operation instead of a table lookup
Diffstat (limited to 'rail.h')
-rw-r--r-- | rail.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -238,8 +238,7 @@ static inline bool HasTrack(TileIndex tile, Track track) * Maps a trackdir to the reverse trackdir. */ static inline Trackdir ReverseTrackdir(Trackdir trackdir) { - extern const Trackdir _reverse_trackdir[TRACKDIR_END]; - return _reverse_trackdir[trackdir]; + return (Trackdir)(trackdir ^ 8); } /** |