mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-28 22:54:29 +01:00
Codechange: Make Price an enum class.
This commit is contained in:
committed by
rubidium42
parent
b556dc24b8
commit
322ce224b4
@@ -1642,7 +1642,7 @@ static bool RoadVehController(RoadVehicle *v)
|
||||
Money RoadVehicle::GetRunningCost() const
|
||||
{
|
||||
const Engine *e = this->GetEngine();
|
||||
if (e->VehInfo<RoadVehicleInfo>().running_cost_class == INVALID_PRICE) return 0;
|
||||
if (e->VehInfo<RoadVehicleInfo>().running_cost_class == Price::Invalid) return 0;
|
||||
|
||||
uint cost_factor = GetVehicleProperty(this, PROP_ROADVEH_RUNNING_COST_FACTOR, e->VehInfo<RoadVehicleInfo>().running_cost);
|
||||
if (cost_factor == 0) return 0;
|
||||
|
||||
Reference in New Issue
Block a user