(svn r5427) - Codechange: testing for "== true" is redundant.
authorpeter1138
Thu, 29 Jun 2006 08:58:08 +0000
changeset 4095 55a5642143f1
parent 4094 a83fac319c4e
child 4096 c7259875a856
(svn r5427) - Codechange: testing for "== true" is redundant.
aircraft_cmd.c
roadveh_cmd.c
ship_cmd.c
train_cmd.c
--- a/aircraft_cmd.c	Thu Jun 29 07:19:24 2006 +0000
+++ b/aircraft_cmd.c	Thu Jun 29 08:58:08 2006 +0000
@@ -223,7 +223,7 @@
 		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);
 
--- a/roadveh_cmd.c	Thu Jun 29 07:19:24 2006 +0000
+++ b/roadveh_cmd.c	Thu Jun 29 08:58:08 2006 +0000
@@ -128,7 +128,7 @@
 		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);
 
--- a/ship_cmd.c	Thu Jun 29 07:19:24 2006 +0000
+++ b/ship_cmd.c	Thu Jun 29 08:58:08 2006 +0000
@@ -850,7 +850,7 @@
 	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);
--- a/train_cmd.c	Thu Jun 29 07:19:24 2006 +0000
+++ b/train_cmd.c	Thu Jun 29 08:58:08 2006 +0000
@@ -742,7 +742,7 @@
 
 		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);