forked from mirror/OpenTTD
Codechange: use std::source_location over __FILE__ and __LINE__ for Backup
This commit is contained in:
@@ -1285,7 +1285,7 @@ void HandleMissingAircraftOrders(Aircraft *v)
|
||||
*/
|
||||
const Station *st = GetTargetAirportIfValid(v);
|
||||
if (st == nullptr) {
|
||||
Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE);
|
||||
Backup<CompanyID> cur_company(_current_company, v->owner);
|
||||
CommandCost ret = Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->index, DepotCommand::None, {});
|
||||
cur_company.Restore();
|
||||
|
||||
@@ -1651,7 +1651,7 @@ static void AircraftEventHandler_HeliTakeOff(Aircraft *v, const AirportFTAClass
|
||||
|
||||
/* Send the helicopter to a hangar if needed for replacement */
|
||||
if (v->NeedsAutomaticServicing()) {
|
||||
Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE);
|
||||
Backup<CompanyID> cur_company(_current_company, v->owner);
|
||||
Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->index, DepotCommand::Service | DepotCommand::LocateHangar, {});
|
||||
cur_company.Restore();
|
||||
}
|
||||
@@ -1702,7 +1702,7 @@ static void AircraftEventHandler_Landing(Aircraft *v, const AirportFTAClass *)
|
||||
|
||||
/* check if the aircraft needs to be replaced or renewed and send it to a hangar if needed */
|
||||
if (v->NeedsAutomaticServicing()) {
|
||||
Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE);
|
||||
Backup<CompanyID> cur_company(_current_company, v->owner);
|
||||
Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->index, DepotCommand::Service, {});
|
||||
cur_company.Restore();
|
||||
}
|
||||
|
Reference in New Issue
Block a user