changeset 5826:4272fa35d44d draft

(svn r8392) -Fix Use HASBIT() instead of implementing it manually
author tron <tron@openttd.org>
date Wed, 24 Jan 2007 17:58:07 +0000
parents 8529f116ed88
children 832de2ec189f
files src/yapf/follow_track.hpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/yapf/follow_track.hpp
+++ b/src/yapf/follow_track.hpp
@@ -172,7 +172,7 @@
 		// rail transport is possible only on compatible rail types
 		if (IsRailTT()) {
 			RailType rail_type = GetTileRailType(m_new_tile, TrackdirToTrack(DiagdirToDiagTrackdir(m_exitdir)));
-			if (((1 << rail_type) & m_veh->u.rail.compatible_railtypes) == 0) {
+			if (!HASBIT(m_veh->u.rail.compatible_railtypes, rail_type)) {
 				// incompatible rail type
 				return false;
 			}