# HG changeset patch # User tron # Date 2007-01-24 17:58:07 # Node ID 84618d25ce1df6fda67a8aac0d9a991e108b7174 # Parent f0c5e2105820c4431d28a9ede6676b84328e0b55 (svn r8392) -Fix Use HASBIT() instead of implementing it manually diff --git a/src/yapf/follow_track.hpp b/src/yapf/follow_track.hpp --- a/src/yapf/follow_track.hpp +++ b/src/yapf/follow_track.hpp @@ -172,7 +172,7 @@ protected: // 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; }