1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-02-03 18:08:14 +01:00

Codechange: strongly type EngineID

This commit is contained in:
Rubidium
2025-02-04 20:55:28 +01:00
committed by rubidium42
parent 17b97e5d1b
commit 7e04651220
10 changed files with 27 additions and 31 deletions

View File

@@ -1519,7 +1519,7 @@ static bool VehicleMaxSpeedSorter(const Vehicle * const &a, const Vehicle * cons
/** Sort vehicles by model */
static bool VehicleModelSorter(const Vehicle * const &a, const Vehicle * const &b)
{
int r = a->engine_type - b->engine_type;
int r = a->engine_type.base() - b->engine_type.base();
return (r != 0) ? r < 0 : VehicleNumberSorter(a, b);
}