From efc8a034b1743673f694352395e890a04ded72db Mon Sep 17 00:00:00 2001 From: yexo Date: Sat, 14 Feb 2009 21:06:58 +0000 Subject: (svn r15484) -Change [API CHANGE]: Remove AICompany::GetCompanyName and SetCompanyName. They've been replaced with GetName and SetName. --- src/ai/api/ai_company.cpp | 12 ------------ src/ai/api/ai_company.hpp | 10 ---------- src/ai/api/ai_company.hpp.sq | 2 -- 3 files changed, 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 @@ -43,11 +43,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. @@ -58,11 +53,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. 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"); -- cgit v1.2.3-70-g09d2