Codechange: strongly type StationID

This commit is contained in:
Rubidium
2025-02-16 15:17:59 +01:00
committed by rubidium42
parent 155aaa5967
commit 59df0ff496
23 changed files with 51 additions and 50 deletions

View File

@@ -44,7 +44,7 @@ static NewsReference CreateReference(ScriptNews::NewsReferenceType ref_type, SQI
EnforcePrecondition(false, company == ScriptCompany::COMPANY_INVALID || ScriptCompany::ResolveCompanyID(company) != ScriptCompany::COMPANY_INVALID);
EnforcePrecondition(false, (ref_type == NR_NONE) ||
(ref_type == NR_TILE && ScriptMap::IsValidTile(::TileIndex(reference))) ||
(ref_type == NR_STATION && ScriptStation::IsValidStation(reference)) ||
(ref_type == NR_STATION && ScriptStation::IsValidStation(static_cast<StationID>(reference))) ||
(ref_type == NR_INDUSTRY && ScriptIndustry::IsValidIndustry(static_cast<IndustryID>(reference))) ||
(ref_type == NR_TOWN && ScriptTown::IsValidTown(static_cast<TownID>(reference))));