From 8343340acb5bdb40555e04f40aac567d6e583bb8 Mon Sep 17 00:00:00 2001 From: smatz Date: Wed, 24 Jun 2009 17:39:54 +0000 Subject: (svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile() --- src/saveload/afterload.cpp | 6 +++--- src/saveload/oldloader_sl.cpp | 1 + src/saveload/vehicle_sl.cpp | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/saveload') diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 6ea186f0c..8ddc8b5ee 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -602,7 +602,7 @@ bool AfterLoadGame() for (TileIndex t = 0; t < map_size; t++) { switch (GetTileType(t)) { case MP_STATION: { - Station *st = GetStationByTile(t); + Station *st = Station::GetByTile(t); /* Set up station spread; buoys do not have one */ if (!IsBuoy(t)) st->rect.BeforeAddTile(t, StationRect::ADD_FORCE); @@ -635,7 +635,7 @@ bool AfterLoadGame() * It was 3 (till 2.2) and later 5 (till 5.1). * Setting it unconditionally does not hurt. */ - GetStationByTile(t)->airport_type = AT_OILRIG; + Station::GetByTile(t)->airport_type = AT_OILRIG; } else { DeleteOilRig(t); } @@ -1575,7 +1575,7 @@ bool AfterLoadGame() if (IsBuoyTile(t)) { /* reset buoy owner to OWNER_NONE in the station struct * (even if it is owned by active company) */ - GetStationByTile(t)->owner = OWNER_NONE; + Station::GetByTile(t)->owner = OWNER_NONE; } } else if (IsTileType(t, MP_ROAD)) { /* works for all RoadTileType */ diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index c89e9ab5c..6c50eb05f 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -11,6 +11,7 @@ #include "../ship.h" #include "../train.h" #include "../signs_base.h" +#include "../station_base.h" #include "../subsidy_type.h" #include "../debug.h" #include "../depot_base.h" diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 415ba76b9..cc1cb4326 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -8,6 +8,7 @@ #include "../roadveh.h" #include "../ship.h" #include "../aircraft.h" +#include "../station_base.h" #include "../effectvehicle_base.h" #include "saveload.h" -- cgit v1.2.3-70-g09d2