diff src/economy.cpp @ 12415:6a77d1df56e2 draft

(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
author smatz <smatz@openttd.org>
date Thu, 16 Jul 2009 19:00:13 +0000
parents d4b73a406cf3
children 0d8340a4c70e
line wrap: on
line diff
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -833,7 +833,7 @@
 	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 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 @@
 	}
 
 	/* 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;