1
0
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:
Cyprian Klimaszewski
2026-01-12 22:22:45 +01:00
committed by rubidium42
parent b556dc24b8
commit 322ce224b4
42 changed files with 325 additions and 326 deletions

View File

@@ -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;