summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-02-14 09:34:12 +0000
committerrubidium <rubidium@openttd.org>2007-02-14 09:34:12 +0000
commitecfbfbd98cca2df5b9a33916263a06773e3836ea (patch)
tree1350c4fc7f65bb1ea2ec7a1f81e80e9017e375b9 /src/roadveh_cmd.cpp
parentf3dc5596ad3b0e77819e78cc9ee803364d43a7c7 (diff)
downloadopenttd-ecfbfbd98cca2df5b9a33916263a06773e3836ea.tar.xz
(svn r8726) -Codechange: bools are 1 or 0 according to the C++ standard and refactor RoadStop::AllocateBay to remove a loop condition. Suggestions by Tron.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 82b8b3bc8..99ed70c78 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -519,7 +519,7 @@ static void ClearCrashedStation(Vehicle *v)
rs->SetEntranceBusy(false);
/* Free the parking bay */
- rs->FreeBay(HASBIT(v->u.road.state, RVS_USING_SECOND_BAY) ? 1 : 0);
+ rs->FreeBay(HASBIT(v->u.road.state, RVS_USING_SECOND_BAY));
}
static void RoadVehDelete(Vehicle *v)
@@ -1437,7 +1437,7 @@ again:
RoadStop *rs = GetRoadStopByTile(v->tile, GetRoadStopType(v->tile));
/* Vehicle is leaving a road stop tile, mark bay as free and clear the usage bit */
- rs->FreeBay(HASBIT(v->u.road.state, RVS_USING_SECOND_BAY) ? 1 : 0);
+ rs->FreeBay(HASBIT(v->u.road.state, RVS_USING_SECOND_BAY));
rs->SetEntranceBusy(false);
}
}