Codechange: do not hide variables with other variables

This commit is contained in:
rubidium42
2023-01-28 20:06:51 +01:00
committed by rubidium42
parent 1951af07c0
commit 6ba55e663e
30 changed files with 137 additions and 146 deletions

View File

@@ -1202,7 +1202,7 @@ CommandCost CmdMoveRailVehicle(DoCommandFlag flags, VehicleID src_veh, VehicleID
dst = Train::GetIfValid(dest_veh);
if (dst == nullptr) return CMD_ERROR;
CommandCost ret = CheckOwnership(dst->owner);
ret = CheckOwnership(dst->owner);
if (ret.Failed()) return ret;
/* Do not allow appending to crashed vehicles, too */
@@ -1271,7 +1271,7 @@ CommandCost CmdMoveRailVehicle(DoCommandFlag flags, VehicleID src_veh, VehicleID
/* If the autoreplace flag is set we do not need to test for the validity
* because we are going to revert the train to its original state. As we
* assume the original state was correct autoreplace can skip this. */
CommandCost ret = ValidateTrains(original_dst_head, dst_head, original_src_head, src_head, true);
ret = ValidateTrains(original_dst_head, dst_head, original_src_head, src_head, true);
if (ret.Failed()) {
/* Restore the train we had. */
RestoreTrainBackup(original_src);