1
0
Fork 0

Codechange: use correct type for variable to prevent casts later on

pull/13360/head
Rubidium 2025-01-21 21:18:16 +01:00 committed by rubidium42
parent f6ab2b69c6
commit c5dac6e619
1 changed files with 3 additions and 3 deletions

View File

@ -631,8 +631,8 @@ void FixupTrainLengths()
} }
static uint8_t _cargo_periods; static uint8_t _cargo_periods;
static uint16_t _cargo_source; static StationID _cargo_source;
static uint32_t _cargo_source_xy; static TileIndex _cargo_source_xy;
static uint16_t _cargo_count; static uint16_t _cargo_count;
static uint16_t _cargo_paid_for; static uint16_t _cargo_paid_for;
static Money _cargo_feeder_share; static Money _cargo_feeder_share;
@ -1138,7 +1138,7 @@ struct VEHSChunkHandler : ChunkHandler {
if (_cargo_count != 0 && IsCompanyBuildableVehicleType(v) && CargoPacket::CanAllocateItem()) { if (_cargo_count != 0 && IsCompanyBuildableVehicleType(v) && CargoPacket::CanAllocateItem()) {
/* Don't construct the packet with station here, because that'll fail with old savegames */ /* Don't construct the packet with station here, because that'll fail with old savegames */
CargoPacket *cp = new CargoPacket(_cargo_count, _cargo_periods, _cargo_source, TileIndex{_cargo_source_xy}, _cargo_feeder_share); CargoPacket *cp = new CargoPacket(_cargo_count, _cargo_periods, _cargo_source, _cargo_source_xy, _cargo_feeder_share);
v->cargo.Append(cp); v->cargo.Append(cp);
} }