summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-02-04 20:40:04 +0000
committertron <tron@openttd.org>2005-02-04 20:40:04 +0000
commit4b71f9126e69aa1cb9c8293bc836401dfe7bdda4 (patch)
tree08aa6c9e8663023614f86710f85fdd0b8d8783b9
parentb4c3f9aaf0e9b922d09060f810b9ee2b3446d6c9 (diff)
downloadopenttd-4b71f9126e69aa1cb9c8293bc836401dfe7bdda4.tar.xz
(svn r1798) GetFoo(i)->index is per definition i, so replace the former with the latter
-rw-r--r--aircraft_gui.c2
-rw-r--r--roadveh_gui.c2
-rw-r--r--ship_gui.c2
-rw-r--r--train_gui.c2
-rw-r--r--vehicle_gui.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c
index 769abc65f..000415e73 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 009b8b6a4..0b0c4704e 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 7c454b151..e5de0fdfe 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 7bfa0fc29..cc98d3471 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 62d720061..e88d3a8d4 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