summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aircraft_cmd.c2
-rw-r--r--roadveh_cmd.c2
-rw-r--r--ship_cmd.c2
-rw-r--r--train_cmd.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index 5ffa59faf..f6c991044 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -512,7 +512,7 @@ int32 CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
if (v->type != VEH_Aircraft || !CheckOwnership(v->owner)) return CMD_ERROR;
if (v->current_order.type == OT_GOTO_DEPOT && !(p2 & DEPOT_LOCATE_HANGAR)) {
- if ((p2 & DEPOT_SERVICE) == (bool)HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
+ if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
/* We called with a different DEPOT_SERVICE setting.
* Now we change the setting to apply the new one and let the vehicle head for the same hangar.
* Note: the if is (true for requesting service == true for ordered to stop in hangar) */
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index 24a433c04..70dadb89b 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -382,7 +382,7 @@ int32 CmdSendRoadVehToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/* If the current orders are already goto-depot */
if (v->current_order.type == OT_GOTO_DEPOT) {
- if ((p2 & DEPOT_SERVICE) == (bool)HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
+ if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
/* We called with a different DEPOT_SERVICE setting.
* Now we change the setting to apply the new one and let the vehicle head for the same depot.
* Note: the if is (true for requesting service == true for ordered to stop in depot) */
diff --git a/ship_cmd.c b/ship_cmd.c
index 87faf037c..7cd4ddccd 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -1020,7 +1020,7 @@ int32 CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/* If the current orders are already goto-depot */
if (v->current_order.type == OT_GOTO_DEPOT) {
- if ((p2 & DEPOT_SERVICE) == (bool)HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
+ if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
/* We called with a different DEPOT_SERVICE setting.
* Now we change the setting to apply the new one and let the vehicle head for the same depot.
* Note: the if is (true for requesting service == true for ordered to stop in depot) */
diff --git a/train_cmd.c b/train_cmd.c
index a67e4dc63..3e69da86c 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1948,7 +1948,7 @@ int32 CmdSendTrainToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (v->vehstatus & VS_CRASHED) return CMD_ERROR;
if (v->current_order.type == OT_GOTO_DEPOT) {
- if ((p2 & DEPOT_SERVICE) == (bool)HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
+ if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
/* We called with a different DEPOT_SERVICE setting.
* Now we change the setting to apply the new one and let the vehicle head for the same depot.
* Note: the if is (true for requesting service == true for ordered to stop in depot) */