diff options
author | smatz <smatz@openttd.org> | 2010-02-05 17:05:58 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2010-02-05 17:05:58 +0000 |
commit | d62d0ac48997f9b72da0f554dcf5269694d5999e (patch) | |
tree | e849059133de10814a39a544a3060a9d7dcff672 /src/ai/api/ai_waypoint.cpp | |
parent | a80eb0a1c00136ca3c4bbbe94842f386fdd2a334 (diff) | |
download | openttd-d62d0ac48997f9b72da0f554dcf5269694d5999e.tar.xz |
(svn r19019) -Codechange: use HasExactlyOneBit() and HasAtMostOneBit() instead of CountBits() where possible
Diffstat (limited to 'src/ai/api/ai_waypoint.cpp')
-rw-r--r-- | src/ai/api/ai_waypoint.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_waypoint.cpp b/src/ai/api/ai_waypoint.cpp index f5badfbbb..a3845f89f 100644 --- a/src/ai/api/ai_waypoint.cpp +++ b/src/ai/api/ai_waypoint.cpp @@ -31,7 +31,7 @@ /* static */ bool AIWaypoint::HasWaypointType(StationID waypoint_id, WaypointType waypoint_type) { if (!IsValidWaypoint(waypoint_id)) return false; - if (CountBits(waypoint_type) != 1) return false; + if (!HasExactlyOneBit(waypoint_type)) return false; return (::Waypoint::Get(waypoint_id)->facilities & waypoint_type) != 0; } |