Codechange: Use EnumBitSet for callback masks.

This commit is contained in:
Peter Nelson
2025-01-30 19:32:41 +00:00
committed by Peter Nelson
parent 1dd4adc50c
commit 40aeedeade
47 changed files with 396 additions and 316 deletions

View File

@@ -103,7 +103,7 @@ static bool IsRoadStopAvailable(const RoadStopSpec *spec, StationType type)
if (spec == nullptr) return true;
if (!IsRoadStopEverAvailable(spec, type)) return false;
if (!HasBit(spec->callback_mask, CBM_ROAD_STOP_AVAIL)) return true;
if (!spec->callback_mask.Test(RoadStopCallbackMask::Avail)) return true;
uint16_t cb_res = GetRoadStopCallback(CBID_STATION_AVAILABILITY, 0, 0, spec, nullptr, INVALID_TILE, _cur_roadtype, type, 0);
if (cb_res == CALLBACK_FAILED) return true;