1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 09:22:42 +01:00

Codechange: Use EnumBitSet for VehStates. (#13755)

Renamed from VehStatus because pluralising that is weird.
This commit is contained in:
Peter Nelson
2025-03-08 18:24:21 +00:00
committed by GitHub
parent 0b102db421
commit 91d22f7617
37 changed files with 199 additions and 206 deletions

View File

@@ -85,7 +85,7 @@ void CheckCaches()
std::vector<TrainCache> tra_cache;
for (Vehicle *v : Vehicle::Iterate()) {
if (v != v->First() || v->vehstatus & VS_CRASHED || !v->IsPrimaryVehicle()) continue;
if (v != v->First() || v->vehstatus.Test(VehState::Crashed) || !v->IsPrimaryVehicle()) continue;
for (const Vehicle *u = v; u != nullptr; u = u->Next()) {
FillNewGRFVehicleCache(u);