summaryrefslogtreecommitdiff
path: root/src/saveload/saveload.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-16 23:34:14 +0000
committersmatz <smatz@openttd.org>2009-05-16 23:34:14 +0000
commit6221d74644922ea4bbba3ed9cd8bbec42398f77b (patch)
tree0069bbd6bb7525754c5d9353132f5dc64a0996cc /src/saveload/saveload.cpp
parent814f153b5a98e0030cbd221e6a89e083ce62bb1d (diff)
downloadopenttd-6221d74644922ea4bbba3ed9cd8bbec42398f77b.tar.xz
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
Diffstat (limited to 'src/saveload/saveload.cpp')
-rw-r--r--src/saveload/saveload.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index b74c2af40..89731bf9c 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -1431,35 +1431,35 @@ static void *IntToReference(uint index, SLRefType rt)
switch (rt) {
case REF_ORDERLIST:
- if (_OrderList_pool.AddBlockIfNeeded(index)) return GetOrderList(index);
+ if (_OrderList_pool.AddBlockIfNeeded(index)) return OrderList::Get(index);
SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME, "OrderList index out of range");
case REF_ORDER:
- if (_Order_pool.AddBlockIfNeeded(index)) return GetOrder(index);
+ if (_Order_pool.AddBlockIfNeeded(index)) return Order::Get(index);
SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME, "Order index out of range");
case REF_VEHICLE:
- if (_Vehicle_pool.AddBlockIfNeeded(index)) return GetVehicle(index);
+ if (_Vehicle_pool.AddBlockIfNeeded(index)) return Vehicle::Get(index);
SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME, "Vehicle index out of range");
case REF_STATION:
- if (_Station_pool.AddBlockIfNeeded(index)) return GetStation(index);
+ if (_Station_pool.AddBlockIfNeeded(index)) return Station::Get(index);
SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME, "Station index out of range");
case REF_TOWN:
- if (_Town_pool.AddBlockIfNeeded(index)) return GetTown(index);
+ if (_Town_pool.AddBlockIfNeeded(index)) return Town::Get(index);
SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME, "Town index out of range");
case REF_ROADSTOPS:
- if (_RoadStop_pool.AddBlockIfNeeded(index)) return GetRoadStop(index);
+ if (_RoadStop_pool.AddBlockIfNeeded(index)) return RoadStop::Get(index);
SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME, "RoadStop index out of range");
case REF_ENGINE_RENEWS:
- if (_EngineRenew_pool.AddBlockIfNeeded(index)) return GetEngineRenew(index);
+ if (_EngineRenew_pool.AddBlockIfNeeded(index)) return EngineRenew::Get(index);
SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME, "EngineRenew index out of range");
case REF_CARGO_PACKET:
- if (_CargoPacket_pool.AddBlockIfNeeded(index)) return GetCargoPacket(index);
+ if (_CargoPacket_pool.AddBlockIfNeeded(index)) return CargoPacket::Get(index);
SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME, "CargoPacket index out of range");
case REF_VEHICLE_OLD:
@@ -1469,7 +1469,7 @@ static void *IntToReference(uint index, SLRefType rt)
index++;
if (index == INVALID_VEHICLE) return NULL;
- if (_Vehicle_pool.AddBlockIfNeeded(index)) return GetVehicle(index);
+ if (_Vehicle_pool.AddBlockIfNeeded(index)) return Vehicle::Get(index);
SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME, "Vehicle index out of range");
default: NOT_REACHED();