summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-06-29 08:58:08 +0000
committerpeter1138 <peter1138@openttd.org>2006-06-29 08:58:08 +0000
commit2e0498dce05b59a8e7a9e99d7508932a9227c993 (patch)
treefaebf81fae1ba3df65ac2ccb7f9bfa02e8e7c71b
parent5c88a9745acb06ed085cba594f3b3ca8d8c04ba3 (diff)
downloadopenttd-2e0498dce05b59a8e7a9e99d7508932a9227c993.tar.xz
(svn r5427) - Codechange: testing for "== true" is redundant.
-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 37d3ee608..a5a93770f 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -223,7 +223,7 @@ int32 CmdBuildAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
return_cmd_error(STR_AIRPORT_HAS_NO_RUNWAY);
}
- unit_num = (HASBIT(p2, 0) == true) ? 0 : GetFreeUnitNumber(VEH_Aircraft);
+ unit_num = HASBIT(p2, 0) ? 0 : GetFreeUnitNumber(VEH_Aircraft);
if (unit_num > _patches.max_aircraft)
return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index d0a3c0a93..ee9f9cec1 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -128,7 +128,7 @@ int32 CmdBuildRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);
/* find the first free roadveh id */
- unit_num = (HASBIT(p2, 0) == true) ? 0 : GetFreeUnitNumber(VEH_Road);
+ unit_num = HASBIT(p2, 0) ? 0 : GetFreeUnitNumber(VEH_Road);
if (unit_num > _patches.max_roadveh)
return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);
diff --git a/ship_cmd.c b/ship_cmd.c
index 85fdbef99..009d243fa 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -850,7 +850,7 @@ int32 CmdBuildShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (!IsTileOwner(tile, _current_player)) return CMD_ERROR;
v = AllocateVehicle();
- unit_num = (HASBIT(p2, 0) == true) ? 0 : GetFreeUnitNumber(VEH_Ship);
+ unit_num = HASBIT(p2, 0) ? 0 : GetFreeUnitNumber(VEH_Ship);
if (v == NULL || IsOrderPoolFull() || unit_num > _patches.max_ships)
return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);
diff --git a/train_cmd.c b/train_cmd.c
index 7becdb023..0fa6cebc9 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -742,7 +742,7 @@ int32 CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
v = vl[0];
- unit_num = (HASBIT(p2, 0) == true) ? 0 : GetFreeUnitNumber(VEH_Train);
+ unit_num = HASBIT(p2, 0) ? 0 : GetFreeUnitNumber(VEH_Train);
if (unit_num > _patches.max_trains)
return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);