summaryrefslogtreecommitdiff
path: root/src/train_gui.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/train_gui.cpp
parent814f153b5a98e0030cbd221e6a89e083ce62bb1d (diff)
downloadopenttd-6221d74644922ea4bbba3ed9cd8bbec42398f77b.tar.xz
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
Diffstat (limited to 'src/train_gui.cpp')
-rw-r--r--src/train_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/train_gui.cpp b/src/train_gui.cpp
index 898182a8e..7ffeac6aa 100644
--- a/src/train_gui.cpp
+++ b/src/train_gui.cpp
@@ -47,7 +47,7 @@ void CcBuildLoco(bool success, TileIndex tile, uint32 p1, uint32 p2)
{
if (!success) return;
- const Vehicle *v = GetVehicle(_new_vehicle_id);
+ const Vehicle *v = Vehicle::Get(_new_vehicle_id);
if (tile == _backup_orders_tile) {
_backup_orders_tile = 0;
RestoreVehicleOrders(v);
@@ -185,7 +185,7 @@ int GetTrainDetailsWndVScroll(VehicleID veh_id, byte det_tab)
memset(max_cargo, 0, sizeof(max_cargo));
memset(act_cargo, 0, sizeof(act_cargo));
- for (const Vehicle *v = GetVehicle(veh_id) ; v != NULL ; v = v->Next()) {
+ for (const Vehicle *v = Vehicle::Get(veh_id) ; v != NULL ; v = v->Next()) {
act_cargo[v->cargo_type] += v->cargo.Count();
max_cargo[v->cargo_type] += v->cargo_cap;
}
@@ -198,7 +198,7 @@ int GetTrainDetailsWndVScroll(VehicleID veh_id, byte det_tab)
}
num++; // needs one more because first line is description string
} else {
- for (const Vehicle *v = GetVehicle(veh_id) ; v != NULL ; v = v->Next()) {
+ for (const Vehicle *v = Vehicle::Get(veh_id) ; v != NULL ; v = v->Next()) {
if (!IsArticulatedPart(v) || v->cargo_cap != 0) num++;
}
}