(svn r1798) GetFoo(i)->index is per definition i, so replace the former with the latter
authortron
Fri, 04 Feb 2005 20:40:04 +0000
changeset 1294 bc831562148e
parent 1293 a09e03073113
child 1295 5dc810674581
(svn r1798) GetFoo(i)->index is per definition i, so replace the former with the latter
aircraft_gui.c
roadveh_gui.c
ship_gui.c
train_gui.c
vehicle_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;
 			}
--- 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;
 			}
--- 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;
 			}
--- 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;
 			}
--- 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