summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-02-14 21:06:58 +0000
committeryexo <yexo@openttd.org>2009-02-14 21:06:58 +0000
commit58359b8d6e411eb43fa362ce364d89bb2a0d71c0 (patch)
tree1c17d9fb86448ec029114e32754f565696680841
parent7fdde2fec0f3038ef0c85218ba55ed83f082a8c1 (diff)
downloadopenttd-58359b8d6e411eb43fa362ce364d89bb2a0d71c0.tar.xz
(svn r15484) -Change [API CHANGE]: Remove AICompany::GetCompanyName and SetCompanyName. They've been replaced with GetName and SetName.
-rw-r--r--src/ai/api/ai_company.cpp12
-rw-r--r--src/ai/api/ai_company.hpp10
-rw-r--r--src/ai/api/ai_company.hpp.sq2
3 files changed, 0 insertions, 24 deletions
diff --git a/src/ai/api/ai_company.cpp b/src/ai/api/ai_company.cpp
index a2f85e202..32e13caef 100644
--- a/src/ai/api/ai_company.cpp
+++ b/src/ai/api/ai_company.cpp
@@ -27,12 +27,6 @@
return ResolveCompanyID(company) == ResolveCompanyID(COMPANY_SELF);
}
-/* static */ bool AICompany::SetCompanyName(const char *name)
-{
- AILog::Error("AICompany::SetCompanyName is obsolete. Use AICompany::SetName instead.");
- return AICompany::SetName(name);
-}
-
/* static */ bool AICompany::SetName(const char *name)
{
EnforcePrecondition(false, !::StrEmpty(name));
@@ -41,12 +35,6 @@
return AIObject::DoCommand(0, 0, 0, CMD_RENAME_COMPANY, name);
}
-/* static */ char *AICompany::GetCompanyName(AICompany::CompanyID company)
-{
- AILog::Error("AICompany::GetCompanyName is obsolete. Use AICompany::GetName instead.");
- return AICompany::GetName(company);
-}
-
/* static */ char *AICompany::GetName(AICompany::CompanyID company)
{
company = ResolveCompanyID(company);
diff --git a/src/ai/api/ai_company.hpp b/src/ai/api/ai_company.hpp
index b08415dd7..18b0bc0d8 100644
--- a/src/ai/api/ai_company.hpp
+++ b/src/ai/api/ai_company.hpp
@@ -44,11 +44,6 @@ public:
static bool IsMine(CompanyID company);
/**
- * Obsolete, use AICompany::SetName instead.
- */
- static bool SetCompanyName(const char *name);
-
- /**
* Set the name of your company.
* @param name The new name of the company.
* @pre 'name' must have at least one character.
@@ -59,11 +54,6 @@ public:
static bool SetName(const char *name);
/**
- * Obsolete, use AICompany::GetName instead.
- */
- static char *GetCompanyName(CompanyID company);
-
- /**
* Get the name of the given company.
* @param company The company to get the name for.
* @pre ResolveCompanyID(company) != COMPANY_INVALID
diff --git a/src/ai/api/ai_company.hpp.sq b/src/ai/api/ai_company.hpp.sq
index 763d348c9..b2275608b 100644
--- a/src/ai/api/ai_company.hpp.sq
+++ b/src/ai/api/ai_company.hpp.sq
@@ -28,9 +28,7 @@ void SQAICompany_Register(Squirrel *engine) {
SQAICompany.DefSQStaticMethod(engine, &AICompany::ResolveCompanyID, "ResolveCompanyID", 2, "?i");
SQAICompany.DefSQStaticMethod(engine, &AICompany::IsMine, "IsMine", 2, "?i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::SetCompanyName, "SetCompanyName", 2, "?s");
SQAICompany.DefSQStaticMethod(engine, &AICompany::SetName, "SetName", 2, "?s");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::GetCompanyName, "GetCompanyName", 2, "?i");
SQAICompany.DefSQStaticMethod(engine, &AICompany::GetName, "GetName", 2, "?i");
SQAICompany.DefSQStaticMethod(engine, &AICompany::SetPresidentName, "SetPresidentName", 2, "?s");
SQAICompany.DefSQStaticMethod(engine, &AICompany::GetPresidentName, "GetPresidentName", 2, "?i");