Codefix: Add missing const inside script functions. (#12794)
Scripts do not modify items directly, marking them const enforces this.
This commit is contained in:
@@ -687,11 +687,11 @@ static void _DoCommandReturnSetOrderFlags(class ScriptInstance *instance)
|
||||
{
|
||||
if (vehicle_type == ScriptVehicle::VT_AIR) {
|
||||
if (ScriptTile::IsStationTile(origin_tile)) {
|
||||
Station *orig_station = ::Station::GetByTile(origin_tile);
|
||||
const Station *orig_station = ::Station::GetByTile(origin_tile);
|
||||
if (orig_station != nullptr && orig_station->airport.tile != INVALID_TILE) origin_tile = orig_station->airport.tile;
|
||||
}
|
||||
if (ScriptTile::IsStationTile(dest_tile)) {
|
||||
Station *dest_station = ::Station::GetByTile(dest_tile);
|
||||
const Station *dest_station = ::Station::GetByTile(dest_tile);
|
||||
if (dest_station != nullptr && dest_station->airport.tile != INVALID_TILE) dest_tile = dest_station->airport.tile;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user