(svn r6146) -Fix: MSVC doesn't know how to cast to an union.. so fix it via an indirect (and btw the old) way
authortruelight
Sat, 26 Aug 2006 17:31:47 +0000
changeset 4393 1e3d47fcdab6
parent 4392 6e2600cb8972
child 4394 42ed16c98253
(svn r6146) -Fix: MSVC doesn't know how to cast to an union.. so fix it via an indirect (and btw the old) way
depot.c
station_cmd.c
waypoint.c
--- a/depot.c	Sat Aug 26 17:16:51 2006 +0000
+++ b/depot.c	Sat Aug 26 17:31:47 2006 +0000
@@ -79,11 +79,14 @@
  */
 void DestroyDepot(Depot *depot)
 {
+	DestinationID dest;
+
 	/* Clear the tile */
 	DoClearSquare(depot->xy);
 
 	/* Clear the depot from all order-lists */
-	RemoveOrderFromAllVehicles(OT_GOTO_DEPOT, (DestinationID)depot->index);
+	dest.depot = depot->index;
+	RemoveOrderFromAllVehicles(OT_GOTO_DEPOT, dest);
 
 	/* Delete the depot-window */
 	DeleteWindowById(WC_VEHICLE_DEPOT, depot->xy);
--- a/station_cmd.c	Sat Aug 26 17:16:51 2006 +0000
+++ b/station_cmd.c	Sat Aug 26 17:31:47 2006 +0000
@@ -2399,6 +2399,7 @@
   */
 static void DeleteStation(Station *st)
 {
+	DestinationID dest;
 	StationID index;
 	Vehicle *v;
 	st->xy = 0;
@@ -2412,7 +2413,8 @@
 	DeleteWindowById(WC_STATION_VIEW, index);
 
 	/* Now delete all orders that go to the station */
-	RemoveOrderFromAllVehicles(OT_GOTO_STATION, (DestinationID)index);
+	dest.station = index;
+	RemoveOrderFromAllVehicles(OT_GOTO_STATION, dest);
 
 	//And do the same with aircraft that have the station as a hangar-stop
 	FOR_ALL_VEHICLES(v) {
--- a/waypoint.c	Sat Aug 26 17:16:51 2006 +0000
+++ b/waypoint.c	Sat Aug 26 17:31:47 2006 +0000
@@ -88,6 +88,7 @@
 /* Update all signs */
 void UpdateAllWaypointSigns(void)
 {
+	DestinationID dest;
 	Waypoint *wp;
 
 	FOR_ALL_WAYPOINTS(wp) {
@@ -98,7 +99,8 @@
 /* Internal handler to delete a waypoint */
 void DestroyWaypoint(Waypoint *wp)
 {
-	RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, (DestinationID)wp->index);
+	dest.waypoint = wp->index;
+	RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, dest);
 
 	if (wp->string != STR_NULL) DeleteName(wp->string);