diff options
author | rubidium <rubidium@openttd.org> | 2013-11-26 12:48:56 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-26 12:48:56 +0000 |
commit | 945fccc706e6ea175e7a112fb78ce1217e7464d5 (patch) | |
tree | 0de47fef0104fa9f947588b24e4122cfb3a46ad4 /src | |
parent | 3b83a195ca38689beae62c4e699fc2c57b76805e (diff) | |
download | openttd-945fccc706e6ea175e7a112fb78ce1217e7464d5.tar.xz |
(svn r26120) -Fix: [Script] Replace simple check with precondition check, after that simple check was documented as a precondition
Diffstat (limited to 'src')
-rw-r--r-- | src/script/api/script_company.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |