summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_subsidy.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/ai/api/ai_subsidy.cpp
parentb6889daf8d11b083358a26eea3f633942e2e50e4 (diff)
downloadopenttd-1f29e38b8372484d51d852b89fc957eb53635ecb.tar.xz
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
Diffstat (limited to 'src/ai/api/ai_subsidy.cpp')
-rw-r--r--src/ai/api/ai_subsidy.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/api/ai_subsidy.cpp b/src/ai/api/ai_subsidy.cpp
index 839654e43..de7616367 100644
--- a/src/ai/api/ai_subsidy.cpp
+++ b/src/ai/api/ai_subsidy.cpp
@@ -57,8 +57,8 @@
{
if (!IsValidSubsidy(subsidy_id) || IsAwarded(subsidy_id)) return false;
- return GetCargo(GetCargoType(subsidy_id))->town_effect == TE_PASSENGERS ||
- GetCargo(GetCargoType(subsidy_id))->town_effect == TE_MAIL;
+ return CargoSpec::Get(GetCargoType(subsidy_id))->town_effect == TE_PASSENGERS ||
+ CargoSpec::Get(GetCargoType(subsidy_id))->town_effect == TE_MAIL;
}
/* static */ int32 AISubsidy::GetSource(SubsidyID subsidy_id)
@@ -72,7 +72,7 @@
{
if (!IsValidSubsidy(subsidy_id) || IsAwarded(subsidy_id)) return false;
- switch (GetCargo(GetCargoType(subsidy_id))->town_effect) {
+ switch (CargoSpec::Get(GetCargoType(subsidy_id))->town_effect) {
case TE_PASSENGERS:
case TE_MAIL:
case TE_GOODS: