(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()

This commit is contained in:
smatz
2009-07-16 19:00:13 +00:00
parent b6889daf8d
commit 1f29e38b83
28 changed files with 99 additions and 90 deletions

View File

@@ -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: