From 945fccc706e6ea175e7a112fb78ce1217e7464d5 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 26 Nov 2013 12:48:56 +0000 Subject: (svn r26120) -Fix: [Script] Replace simple check with precondition check, after that simple check was documented as a precondition --- src/script/api/script_company.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/script/api/script_company.cpp b/src/script/api/script_company.cpp index 851ca7888..ee00ef9e5 100644 --- a/src/script/api/script_company.cpp +++ b/src/script/api/script_company.cpp @@ -246,7 +246,7 @@ /* static */ TileIndex ScriptCompany::GetCompanyHQ(CompanyID company) { company = ResolveCompanyID(company); - if (company == COMPANY_INVALID) return INVALID_TILE; + EnforcePrecondition(INVALID_TILE, company != COMPANY_INVALID); TileIndex loc = ::Company::Get((CompanyID)company)->location_of_HQ; return (loc == 0) ? INVALID_TILE : loc; -- cgit v1.2.3-70-g09d2