Mercurial > hg > openttd
changeset 4494:b80d443e41d9 draft
(svn r6279) -Codechange (r1525): Use proper const pointers for functions that do not change them .
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Thu, 31 Aug 2006 15:28:11 +0000 |
parents | ad6e7b424609 |
children | f5ef27f5ea37 |
files | vehicle.h |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/vehicle.h +++ b/vehicle.h @@ -426,11 +426,10 @@ } /* Get the first vehicle of a shared-list, so we only have to walk forwards */ -static inline Vehicle *GetFirstVehicleFromSharedList(Vehicle *v) +static inline Vehicle *GetFirstVehicleFromSharedList(const Vehicle *v) { - Vehicle *u = v; - while (u->prev_shared != NULL) - u = u->prev_shared; + Vehicle *u = (Vehicle *)v; + while (u->prev_shared != NULL) u = u->prev_shared; return u; } @@ -462,8 +461,7 @@ * Best is to have a virtual value for it when it needs to change again */ #define STATUS_BAR 5 +extern const uint32 _send_to_depot_proc_table[]; #define CMD_SEND_TO_DEPOT(x) _send_to_depot_proc_table[ x - VEH_Train] -extern const uint32 _send_to_depot_proc_table[]; - #endif /* VEHICLE_H */