# HG changeset patch # User tron # Date 1107549604 0 # Node ID bc831562148e18e608f3cb2a0125bd8f451a2d0b # Parent a09e03073113fa032063da7f59dbb7dafec783a8 (svn r1798) GetFoo(i)->index is per definition i, so replace the former with the latter diff -r a09e03073113 -r bc831562148e aircraft_gui.c --- a/aircraft_gui.c Fri Feb 04 20:17:15 2005 +0000 +++ b/aircraft_gui.c Fri Feb 04 20:40:04 2005 +0000 @@ -1012,7 +1012,7 @@ w->widget[1].unkA = STR_A009_AIRCRAFT; } else { /* Station Name -- (###) Aircraft */ - SetDParam(0, GetStation(station)->index); + SetDParam(0, station); SetDParam(1, w->vscroll.count); w->widget[1].unkA = STR_SCHEDULED_AIRCRAFT; } diff -r a09e03073113 -r bc831562148e roadveh_gui.c --- a/roadveh_gui.c Fri Feb 04 20:17:15 2005 +0000 +++ b/roadveh_gui.c Fri Feb 04 20:40:04 2005 +0000 @@ -799,7 +799,7 @@ w->widget[1].unkA = STR_9001_ROAD_VEHICLES; } else { /* Station Name -- (###) Road vehicles */ - SetDParam(0, GetStation(station)->index); + SetDParam(0, station); SetDParam(1, w->vscroll.count); w->widget[1].unkA = STR_SCHEDULED_ROAD_VEHICLES; } diff -r a09e03073113 -r bc831562148e ship_gui.c --- a/ship_gui.c Fri Feb 04 20:17:15 2005 +0000 +++ b/ship_gui.c Fri Feb 04 20:40:04 2005 +0000 @@ -956,7 +956,7 @@ w->widget[1].unkA = STR_9805_SHIPS; } else { /* Station Name -- (###) Trains */ - SetDParam(0, GetStation(station)->index); + SetDParam(0, station); SetDParam(1, w->vscroll.count); w->widget[1].unkA = STR_SCHEDULED_SHIPS; } diff -r a09e03073113 -r bc831562148e train_gui.c --- a/train_gui.c Fri Feb 04 20:17:15 2005 +0000 +++ b/train_gui.c Fri Feb 04 20:40:04 2005 +0000 @@ -1298,7 +1298,7 @@ w->widget[1].unkA = STR_881B_TRAINS; } else { /* Station Name -- (###) Trains */ - SetDParam(0, GetStation(station)->index); + SetDParam(0, station); SetDParam(1, w->vscroll.count); w->widget[1].unkA = STR_SCHEDULED_TRAINS; } diff -r a09e03073113 -r bc831562148e vehicle_gui.c --- a/vehicle_gui.c Fri Feb 04 20:17:15 2005 +0000 +++ b/vehicle_gui.c Fri Feb 04 20:40:04 2005 +0000 @@ -176,7 +176,7 @@ */ int CDECL VehicleUnsortedSorter(const void *a, const void *b) { - return GetVehicle((*(const SortStruct*)a).index)->index - GetVehicle((*(const SortStruct*)b).index)->index; + return ((const SortStruct*)a)->index - ((const SortStruct*)b)->index; } // if the sorting criteria had the same value, sort vehicle by unitnumber