Codechange: change DestinationID into class with conversion helpers
A DestinationID is either a DepotID or StationID, where the aircraft hangar being conceptually a depot is actually a StationID. When making those types stronger, a lot of casts would need to be added, but this shows the intent much better.
This commit is contained in:
@@ -1369,7 +1369,7 @@ bool LoadOldVehicle(LoadgameState *ls, int num)
|
||||
v->current_order.AssignOrder(UnpackOldOrder(_old_order));
|
||||
|
||||
if (v->type == VEH_DISASTER) {
|
||||
DisasterVehicle::From(v)->state = UnpackOldOrder(_old_order).GetDestination();
|
||||
DisasterVehicle::From(v)->state = UnpackOldOrder(_old_order).GetDestination().value;
|
||||
}
|
||||
|
||||
v->next = (Vehicle *)(size_t)_old_next_ptr;
|
||||
|
||||
Reference in New Issue
Block a user