summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_town.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2009-01-16 00:05:26 +0000
committertruebrain <truebrain@openttd.org>2009-01-16 00:05:26 +0000
commitbd520ca5623081bd00958a278b19b38d295a0324 (patch)
tree9e3c6b823cc8e282db94a22336d126affeaaac1c /src/ai/api/ai_town.cpp
parentb9ebab0e5d7ccae6464d31e754d4e9c1ea946085 (diff)
downloadopenttd-bd520ca5623081bd00958a278b19b38d295a0324.tar.xz
(svn r15101) -Change [API CHANGE]: more consistant naming for consts:
INVALID_TOWN_RATING -> TOWN_RATING_INVALID INVALID_TRANSPORT -> TRANSPORT_INVALID INVALID_ORDER -> ORDER_INVALID INVALID_GROUP -> GROUP_INVALID GROUP_ALL/DEFAULT -> ALL/DEFAULT_GROUP VEHICLE_RAIL/ROAD/.. -> VT_RAIL/ROAD/.. MY_COMPANY -> COMPANY_SELF FIRST/LAST/INVALID_COMPANY -> COMPANY_FIRST/LAST/INVALID
Diffstat (limited to 'src/ai/api/ai_town.cpp')
-rw-r--r--src/ai/api/ai_town.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/api/ai_town.cpp b/src/ai/api/ai_town.cpp
index 8c8ab9c02..921e5a73e 100644
--- a/src/ai/api/ai_town.cpp
+++ b/src/ai/api/ai_town.cpp
@@ -139,7 +139,7 @@
/* static */ AICompany::CompanyID AITown::GetExclusiveRightsCompany(TownID town_id)
{
- if (!IsValidTown(town_id)) return AICompany::INVALID_COMPANY;
+ if (!IsValidTown(town_id)) return AICompany::COMPANY_INVALID;
return (AICompany::CompanyID)(int8)::GetTown(town_id)->exclusivity;
}
@@ -170,9 +170,9 @@ extern uint GetMaskOfTownActions(int *nump, CompanyID cid, const Town *t);
/* static */ AITown::TownRating AITown::GetRating(TownID town_id, AICompany::CompanyID company_id)
{
- if (!IsValidTown(town_id)) return INVALID_TOWN_RATING;
+ if (!IsValidTown(town_id)) return TOWN_RATING_INVALID;
AICompany::CompanyID company = AICompany::ResolveCompanyID(company_id);
- if (company == AICompany::INVALID_COMPANY) return INVALID_TOWN_RATING;
+ if (company == AICompany::COMPANY_INVALID) return TOWN_RATING_INVALID;
const Town *t = ::GetTown(town_id);
if (!HasBit(t->have_ratings, company)) return TOWN_RATING_NONE;