Codefix: Add missing const inside script functions. (#12794)
Scripts do not modify items directly, marking them const enforces this.
This commit is contained in:
@@ -32,7 +32,7 @@ ScriptStationList_Vehicle::ScriptStationList_Vehicle(VehicleID vehicle_id)
|
||||
{
|
||||
if (!ScriptVehicle::IsPrimaryVehicle(vehicle_id)) return;
|
||||
|
||||
Vehicle *v = ::Vehicle::Get(vehicle_id);
|
||||
const Vehicle *v = ::Vehicle::Get(vehicle_id);
|
||||
|
||||
for (Order *o = v->GetFirstOrder(); o != nullptr; o = o->next) {
|
||||
if (o->IsType(OT_GOTO_STATION)) this->AddItem(o->GetDestination());
|
||||
|
||||
Reference in New Issue
Block a user