(svn r8276) -Fix
Change the signature of Swap() to be less error prone, i.e. pass the variables to be swapped by reference instead of passing pointers to the variables. Just do Swap(x, y) instead of Swap(&x, &y). This prevents accidents when the variables are pointers.
This commit is contained in:
@@ -310,7 +310,7 @@ static void FixOldStations(void)
|
||||
FOR_ALL_STATIONS(st) {
|
||||
/* Check if we need to swap width and height for the station */
|
||||
if (st->train_tile != 0 && GetRailStationAxis(st->train_tile) != AXIS_X) {
|
||||
SwapT(&st->trainst_w, &st->trainst_h);
|
||||
Swap(st->trainst_w, st->trainst_h);
|
||||
}
|
||||
|
||||
/* Check if there is a bus or truck station, and convert to new format */
|
||||
|
Reference in New Issue
Block a user