summaryrefslogtreecommitdiff
path: root/src/economy.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/economy.cpp
parentb6889daf8d11b083358a26eea3f633942e2e50e4 (diff)
downloadopenttd-1f29e38b8372484d51d852b89fc957eb53635ecb.tar.xz
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 2c2077c0c..bcd678f31 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -833,7 +833,7 @@ void ResetEconomy()
bool needed = false;
for (CargoID c = 0; c < NUM_CARGO; c++) {
- const CargoSpec *cs = GetCargo(c);
+ const CargoSpec *cs = CargoSpec::Get(c);
if (!cs->IsValid()) continue;
if (_cargo_payment_rates[c] == 0) {
needed = true;
@@ -866,7 +866,7 @@ Money GetPriceByIndex(uint8 index)
Money GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type)
{
- const CargoSpec *cs = GetCargo(cargo_type);
+ const CargoSpec *cs = CargoSpec::Get(cargo_type);
/* Use callback to calculate cargo profit, if available */
if (HasBit(cs->callback_mask, CBM_CARGO_PROFIT_CALC)) {
@@ -1089,7 +1089,7 @@ static Money DeliverGoods(int num_pieces, CargoID cargo_type, StationID source,
}
/* Increase town's counter for some special goods types */
- const CargoSpec *cs = GetCargo(cargo_type);
+ const CargoSpec *cs = CargoSpec::Get(cargo_type);
if (cs->town_effect == TE_FOOD) s_to->town->new_act_food += num_pieces;
if (cs->town_effect == TE_WATER) s_to->town->new_act_water += num_pieces;