diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2019-04-22 09:10:04 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-04-29 17:40:22 +0100 |
commit | 5b34c8019f135afd9f20d043a489ab96f286038a (patch) | |
tree | 84b38701d78f2348ad1e54c5cb379fc15bdcfe67 /src/script/api | |
parent | fcf06ba4c43bb9b7ac0b8541377a5240b3e01126 (diff) | |
download | openttd-5b34c8019f135afd9f20d043a489ab96f286038a.tar.xz |
Codechange: Remove Company/OwnerByte types
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/script_cargomonitor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/script/api/script_cargomonitor.cpp b/src/script/api/script_cargomonitor.cpp index 3cb9b4a8e..e862fed3e 100644 --- a/src/script/api/script_cargomonitor.cpp +++ b/src/script/api/script_cargomonitor.cpp @@ -20,7 +20,7 @@ /* static */ int32 ScriptCargoMonitor::GetTownDeliveryAmount(ScriptCompany::CompanyID company, CargoID cargo, TownID town_id, bool keep_monitoring) { CompanyID cid = static_cast<CompanyID>(company); - if (cid < OWNER_BEGIN || cid >= MAX_COMPANIES) return -1; + if (cid >= MAX_COMPANIES) return -1; if (!ScriptCargo::IsValidCargo(cargo)) return -1; if (!::Town::IsValidID(town_id)) return -1; @@ -31,7 +31,7 @@ /* static */ int32 ScriptCargoMonitor::GetIndustryDeliveryAmount(ScriptCompany::CompanyID company, CargoID cargo, IndustryID industry_id, bool keep_monitoring) { CompanyID cid = static_cast<CompanyID>(company); - if (cid < OWNER_BEGIN || cid >= MAX_COMPANIES) return -1; + if (cid >= MAX_COMPANIES) return -1; if (!ScriptCargo::IsValidCargo(cargo)) return -1; if (!::Industry::IsValidID(industry_id)) return -1; @@ -42,7 +42,7 @@ /* static */ int32 ScriptCargoMonitor::GetTownPickupAmount(ScriptCompany::CompanyID company, CargoID cargo, TownID town_id, bool keep_monitoring) { CompanyID cid = static_cast<CompanyID>(company); - if (cid < OWNER_BEGIN || cid >= MAX_COMPANIES) return -1; + if (cid >= MAX_COMPANIES) return -1; if (!ScriptCargo::IsValidCargo(cargo)) return -1; if (!::Town::IsValidID(town_id)) return -1; @@ -53,7 +53,7 @@ /* static */ int32 ScriptCargoMonitor::GetIndustryPickupAmount(ScriptCompany::CompanyID company, CargoID cargo, IndustryID industry_id, bool keep_monitoring) { CompanyID cid = static_cast<CompanyID>(company); - if (cid < OWNER_BEGIN || cid >= MAX_COMPANIES) return -1; + if (cid >= MAX_COMPANIES) return -1; if (!ScriptCargo::IsValidCargo(cargo)) return -1; if (!::Industry::IsValidID(industry_id)) return -1; |