forked from mirror/OpenTTD
Codechange: Make TileIndex a "strong" typedef to give it a distinct type.
This is accomplished by changing it to a single member struct with the appropriate operator overloads to make it all work with not too much source modifications.
This commit is contained in:
@@ -1343,7 +1343,7 @@ bool LoadOldVehicle(LoadgameState *ls, int num)
|
||||
|
||||
if (_cargo_count != 0 && CargoPacket::CanAllocateItem()) {
|
||||
StationID source = (_cargo_source == 0xFF) ? INVALID_STATION : _cargo_source;
|
||||
TileIndex source_xy = (source != INVALID_STATION) ? Station::Get(source)->xy : 0;
|
||||
TileIndex source_xy = (source != INVALID_STATION) ? Station::Get(source)->xy : (TileIndex)0;
|
||||
v->cargo.Append(new CargoPacket(_cargo_count, _cargo_days, source, source_xy, source_xy));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user