Codechange: strongly type VehicleID

This commit is contained in:
Rubidium
2025-02-02 10:41:00 +01:00
committed by rubidium42
parent 1003967267
commit 70c9f3963c
15 changed files with 31 additions and 33 deletions

View File

@@ -994,7 +994,7 @@ void CallVehicleTicks()
PerformanceAccumulator::Reset(PFE_GL_AIRCRAFT);
for (Vehicle *v : Vehicle::Iterate()) {
[[maybe_unused]] size_t vehicle_index = v->index;
[[maybe_unused]] VehicleID vehicle_index = v->index;
/* Vehicle could be deleted in this tick */
if (!v->Tick()) {
@@ -3007,7 +3007,7 @@ void Vehicle::RemoveFromShared()
} else if (were_first) {
/* If we were the first one, update to the new first one.
* Note: FirstShared() is already the new first */
InvalidateWindowData(GetWindowClassForVehicleType(this->type), vli.ToWindowNumber(), this->FirstShared()->index | (1U << 31));
InvalidateWindowData(GetWindowClassForVehicleType(this->type), vli.ToWindowNumber(), this->FirstShared()->index.base() | (1U << 31));
}
this->next_shared = nullptr;