Codechange: use TileIndex constructor explicitly

This commit is contained in:
Rubidium
2025-01-01 09:24:26 +01:00
committed by rubidium42
parent fd5f6caed4
commit f55ba40b13
12 changed files with 57 additions and 51 deletions

View File

@@ -31,7 +31,7 @@
EnforcePrecondition(false, type == NT_ECONOMY || type == NT_SUBSIDIES || type == NT_GENERAL);
EnforcePrecondition(false, company == ScriptCompany::COMPANY_INVALID || ScriptCompany::ResolveCompanyID(company) != ScriptCompany::COMPANY_INVALID);
EnforcePrecondition(false, (ref_type == NR_NONE) ||
(ref_type == NR_TILE && ScriptMap::IsValidTile(reference)) ||
(ref_type == NR_TILE && ScriptMap::IsValidTile(::TileIndex(reference))) ||
(ref_type == NR_STATION && ScriptStation::IsValidStation(reference)) ||
(ref_type == NR_INDUSTRY && ScriptIndustry::IsValidIndustry(reference)) ||
(ref_type == NR_TOWN && ScriptTown::IsValidTown(reference)));