From 63793041263223303f9bd9963101f5f050e8ad78 Mon Sep 17 00:00:00 2001 From: tron Date: Fri, 4 Feb 2005 20:40:04 +0000 Subject: [PATCH] (svn r1798) GetFoo(i)->index is per definition i, so replace the former with the latter --- aircraft_gui.c | 2 +- roadveh_gui.c | 2 +- ship_gui.c | 2 +- train_gui.c | 2 +- vehicle_gui.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aircraft_gui.c b/aircraft_gui.c index 769abc65f7..000415e735 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -1012,7 +1012,7 @@ static void PlayerAircraftWndProc(Window *w, WindowEvent *e) 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 --git a/roadveh_gui.c b/roadveh_gui.c index 009b8b6a45..0b0c4704ef 100644 --- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -799,7 +799,7 @@ static void PlayerRoadVehWndProc(Window *w, WindowEvent *e) 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 --git a/ship_gui.c b/ship_gui.c index 7c454b151f..e5de0fdfe8 100644 --- a/ship_gui.c +++ b/ship_gui.c @@ -956,7 +956,7 @@ static void PlayerShipsWndProc(Window *w, WindowEvent *e) 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 --git a/train_gui.c b/train_gui.c index 7bfa0fc294..cc98d34711 100644 --- a/train_gui.c +++ b/train_gui.c @@ -1298,7 +1298,7 @@ static void PlayerTrainsWndProc(Window *w, WindowEvent *e) 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 --git a/vehicle_gui.c b/vehicle_gui.c index 62d7200610..e88d3a8d42 100644 --- a/vehicle_gui.c +++ b/vehicle_gui.c @@ -176,7 +176,7 @@ int CDECL GeneralOwnerSorter(const void *a, const void *b) */ 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