summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-02-05 17:05:58 +0000
committersmatz <smatz@openttd.org>2010-02-05 17:05:58 +0000
commitd62d0ac48997f9b72da0f554dcf5269694d5999e (patch)
treee849059133de10814a39a544a3060a9d7dcff672 /src/roadveh_cmd.cpp
parenta80eb0a1c00136ca3c4bbbe94842f386fdd2a334 (diff)
downloadopenttd-d62d0ac48997f9b72da0f554dcf5269694d5999e.tar.xz
(svn r19019) -Codechange: use HasExactlyOneBit() and HasAtMostOneBit() instead of CountBits() where possible
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 5ff4816ad..b7dd6bb4c 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1355,7 +1355,7 @@ again:
uint turn_around_start_frame = RVC_TURN_AROUND_START_FRAME;
RoadBits tram;
- if (v->roadtype == ROADTYPE_TRAM && !IsRoadDepotTile(v->tile) && CountBits(tram = GetAnyRoadBits(v->tile, ROADTYPE_TRAM, true)) == 1) {
+ if (v->roadtype == ROADTYPE_TRAM && !IsRoadDepotTile(v->tile) && HasExactlyOneBit(tram = GetAnyRoadBits(v->tile, ROADTYPE_TRAM, true))) {
/*
* The tram is turning around with one tram 'roadbit'. This means that
* it is using the 'big' corner 'drive data'. However, to support the