Codechange: do not hide variables with other variables
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user