summaryrefslogtreecommitdiff
path: root/src/ai/api
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-17 01:00:56 +0000
committersmatz <smatz@openttd.org>2009-05-17 01:00:56 +0000
commit871107f52952ee59c353feab933126ed206e60bf (patch)
tree482884dfedc1700bddb8812f1de755212ed8bb22 /src/ai/api
parented1e54bd84074412ea9f273b7cd86aed42d844ce (diff)
downloadopenttd-871107f52952ee59c353feab933126ed206e60bf.tar.xz
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
Diffstat (limited to 'src/ai/api')
-rw-r--r--src/ai/api/ai_company.cpp2
-rw-r--r--src/ai/api/ai_group.cpp2
-rw-r--r--src/ai/api/ai_industry.cpp2
-rw-r--r--src/ai/api/ai_sign.cpp2
-rw-r--r--src/ai/api/ai_station.cpp2
-rw-r--r--src/ai/api/ai_town.cpp2
-rw-r--r--src/ai/api/ai_vehicle.cpp2
-rw-r--r--src/ai/api/ai_waypoint.cpp2
8 files changed, 8 insertions, 8 deletions
diff --git a/src/ai/api/ai_company.cpp b/src/ai/api/ai_company.cpp
index 075ef6b51..ba70d859a 100644
--- a/src/ai/api/ai_company.cpp
+++ b/src/ai/api/ai_company.cpp
@@ -19,7 +19,7 @@
{
if (company == COMPANY_SELF) return (CompanyID)((byte)_current_company);
- return ::IsValidCompanyID((::CompanyID)company) ? company : COMPANY_INVALID;
+ return ::Company::IsValidID((::CompanyID)company) ? company : COMPANY_INVALID;
}
/* static */ bool AICompany::IsMine(AICompany::CompanyID company)
diff --git a/src/ai/api/ai_group.cpp b/src/ai/api/ai_group.cpp
index 165b1028e..6f4d25de9 100644
--- a/src/ai/api/ai_group.cpp
+++ b/src/ai/api/ai_group.cpp
@@ -16,7 +16,7 @@
/* static */ bool AIGroup::IsValidGroup(GroupID group_id)
{
- return ::IsValidGroupID(group_id) && ::Group::Get(group_id)->owner == _current_company;
+ return ::Group::IsValidID(group_id) && ::Group::Get(group_id)->owner == _current_company;
}
/* static */ AIGroup::GroupID AIGroup::CreateGroup(AIVehicle::VehicleType vehicle_type)
diff --git a/src/ai/api/ai_industry.cpp b/src/ai/api/ai_industry.cpp
index 3a1acb213..5b7766fa2 100644
--- a/src/ai/api/ai_industry.cpp
+++ b/src/ai/api/ai_industry.cpp
@@ -18,7 +18,7 @@
/* static */ bool AIIndustry::IsValidIndustry(IndustryID industry_id)
{
- return ::IsValidIndustryID(industry_id);
+ return ::Industry::IsValidID(industry_id);
}
/* static */ char *AIIndustry::GetName(IndustryID industry_id)
diff --git a/src/ai/api/ai_sign.cpp b/src/ai/api/ai_sign.cpp
index 72e34d333..8876bbeec 100644
--- a/src/ai/api/ai_sign.cpp
+++ b/src/ai/api/ai_sign.cpp
@@ -20,7 +20,7 @@
/* static */ bool AISign::IsValidSign(SignID sign_id)
{
- return ::IsValidSignID(sign_id) && ::Sign::Get(sign_id)->owner == _current_company;
+ return ::Sign::IsValidID(sign_id) && ::Sign::Get(sign_id)->owner == _current_company;
}
/* static */ bool AISign::SetName(SignID sign_id, const char *name)
diff --git a/src/ai/api/ai_station.cpp b/src/ai/api/ai_station.cpp
index 7a9f5cb8d..cc1167ddc 100644
--- a/src/ai/api/ai_station.cpp
+++ b/src/ai/api/ai_station.cpp
@@ -17,7 +17,7 @@
/* static */ bool AIStation::IsValidStation(StationID station_id)
{
- return ::IsValidStationID(station_id) && ::Station::Get(station_id)->owner == _current_company;
+ return ::Station::IsValidID(station_id) && ::Station::Get(station_id)->owner == _current_company;
}
/* static */ StationID AIStation::GetStationID(TileIndex tile)
diff --git a/src/ai/api/ai_town.cpp b/src/ai/api/ai_town.cpp
index a37d065e5..e49c1a36a 100644
--- a/src/ai/api/ai_town.cpp
+++ b/src/ai/api/ai_town.cpp
@@ -21,7 +21,7 @@
/* static */ bool AITown::IsValidTown(TownID town_id)
{
- return ::IsValidTownID(town_id);
+ return ::Town::IsValidID(town_id);
}
/* static */ char *AITown::GetName(TownID town_id)
diff --git a/src/ai/api/ai_vehicle.cpp b/src/ai/api/ai_vehicle.cpp
index b61519915..5d1579364 100644
--- a/src/ai/api/ai_vehicle.cpp
+++ b/src/ai/api/ai_vehicle.cpp
@@ -19,7 +19,7 @@
/* static */ bool AIVehicle::IsValidVehicle(VehicleID vehicle_id)
{
- if (!::IsValidVehicleID(vehicle_id)) return false;
+ if (!::Vehicle::IsValidID(vehicle_id)) return false;
const Vehicle *v = ::Vehicle::Get(vehicle_id);
return v->owner == _current_company && (v->IsPrimaryVehicle() || (v->type == VEH_TRAIN && ::IsFreeWagon(v)));
}
diff --git a/src/ai/api/ai_waypoint.cpp b/src/ai/api/ai_waypoint.cpp
index ec6af36eb..0c1e3194b 100644
--- a/src/ai/api/ai_waypoint.cpp
+++ b/src/ai/api/ai_waypoint.cpp
@@ -14,7 +14,7 @@
/* static */ bool AIWaypoint::IsValidWaypoint(WaypointID waypoint_id)
{
- return ::IsValidWaypointID(waypoint_id) && ::Waypoint::Get(waypoint_id)->owner == _current_company;
+ return ::Waypoint::IsValidID(waypoint_id) && ::Waypoint::Get(waypoint_id)->owner == _current_company;
}
/* static */ WaypointID AIWaypoint::GetWaypointID(TileIndex tile)