summaryrefslogtreecommitdiff
path: root/src/build_vehicle_gui.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-07-16 19:00:13 +0000
committersmatz <smatz@openttd.org>2009-07-16 19:00:13 +0000
commit1f29e38b8372484d51d852b89fc957eb53635ecb (patch)
treeda4a251ac74e87e72a2857233069790f991914f6 /src/build_vehicle_gui.cpp
parentb6889daf8d11b083358a26eea3f633942e2e50e4 (diff)
downloadopenttd-1f29e38b8372484d51d852b89fc957eb53635ecb.tar.xz
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r--src/build_vehicle_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 5a8433ffa..07443475b 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -445,7 +445,7 @@ static int DrawRailWagonPurchaseInfo(int left, int right, int y, EngineID engine
/* Wagon weight - (including cargo) */
uint weight = e->GetDisplayWeight();
SetDParam(0, weight);
- uint cargo_weight = (e->CanCarryCargo() ? GetCargo(e->GetDefaultCargoType())->weight * e->GetDisplayDefaultCapacity() >> 4 : 0);
+ uint cargo_weight = (e->CanCarryCargo() ? CargoSpec::Get(e->GetDefaultCargoType())->weight * e->GetDisplayDefaultCapacity() >> 4 : 0);
SetDParam(1, cargo_weight + weight);
DrawString(left, right, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT);
y += FONT_HEIGHT_NORMAL;
@@ -821,7 +821,7 @@ struct BuildVehicleWindow : Window {
/* Collect available cargo types for filtering */
for (CargoID cid = 0; cid < NUM_CARGO; cid++) {
- const CargoSpec *cargo = GetCargo(cid);
+ const CargoSpec *cargo = CargoSpec::Get(cid);
if (!cargo->IsValid()) continue;
if (IsCargoInClass(cid, CC_SPECIAL)) continue; // exclude fake cargo types
this->cargo_filter[filter_items] = cid;