(svn r8392) -Fix
authortron
Wed, 24 Jan 2007 17:58:07 +0000
changeset 5826 b3f88b8cf0a2
parent 5825 5fc4d2f7be46
child 5827 2d0ec2a21996
(svn r8392) -Fix

Use HASBIT() instead of implementing it manually
src/yapf/follow_track.hpp
--- a/src/yapf/follow_track.hpp	Wed Jan 24 15:01:20 2007 +0000
+++ b/src/yapf/follow_track.hpp	Wed Jan 24 17:58:07 2007 +0000
@@ -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;
 			}