Codechange: Use EnumBitSet for StationFacility.

This commit is contained in:
Peter Nelson
2025-02-12 19:42:26 +00:00
committed by Peter Nelson
parent 8d38308ebb
commit 75387b9e2b
39 changed files with 157 additions and 167 deletions

View File

@@ -23,7 +23,7 @@ ScriptStationList::ScriptStationList(ScriptStation::StationType station_type)
::CompanyID owner = ScriptObject::GetCompany();
ScriptList::FillList<Station>(this,
[is_deity, owner, station_type](const Station *st) {
return (is_deity || st->owner == owner) && (st->facilities & static_cast<StationFacility>(station_type)) != 0;
return (is_deity || st->owner == owner) && st->facilities.Any(static_cast<StationFacilities>(station_type));
}
);
}