diff options
Diffstat (limited to 'saveload.c')
-rw-r--r-- | saveload.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/saveload.c b/saveload.c index 70d77eabc..499bd3006 100644 --- a/saveload.c +++ b/saveload.c @@ -1111,11 +1111,11 @@ static uint ReferenceToInt(const void *obj, SLRefType rt) switch (rt) { case REF_VEHICLE_OLD: // Old vehicles we save as new onces - case REF_VEHICLE: return ((Vehicle *)obj)->index + 1; - case REF_STATION: return ((Station *)obj)->index + 1; - case REF_TOWN: return ((Town *)obj)->index + 1; - case REF_ORDER: return ((Order *)obj)->index + 1; - case REF_ROADSTOPS: return ((RoadStop *)obj)->index + 1; + case REF_VEHICLE: return ((const Vehicle*)obj)->index + 1; + case REF_STATION: return ((const Station*)obj)->index + 1; + case REF_TOWN: return ((const Town*)obj)->index + 1; + case REF_ORDER: return ((const Order*)obj)->index + 1; + case REF_ROADSTOPS: return ((const RoadStop*)obj)->index + 1; default: NOT_REACHED(); } |