summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-03-01 15:15:50 +0100
committerPatric Stout <github@truebrain.nl>2021-03-01 16:35:16 +0100
commit25e5a92286958fd870f5783cbb4ebad5ecde77da (patch)
treea849cc5af0bd71c57048d36954638c0ded975c21
parent8bc0089fc498d603ceef228c5488037721eb548d (diff)
downloadopenttd-25e5a92286958fd870f5783cbb4ebad5ecde77da.tar.xz
Fix 9b800a96: (a << 16) is unsigned, so don't remove the cast
-rw-r--r--src/company_cmd.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index 4715efc9a..f1c559926 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -63,9 +63,9 @@ Company::Company(uint16 name_1, bool is_ai)
this->name_1 = name_1;
this->location_of_HQ = INVALID_TILE;
this->is_ai = is_ai;
- this->terraform_limit = _settings_game.construction.terraform_frame_burst << 16;
- this->clear_limit = _settings_game.construction.clear_frame_burst << 16;
- this->tree_limit = _settings_game.construction.tree_frame_burst << 16;
+ this->terraform_limit = (uint32)_settings_game.construction.terraform_frame_burst << 16;
+ this->clear_limit = (uint32)_settings_game.construction.clear_frame_burst << 16;
+ this->tree_limit = (uint32)_settings_game.construction.tree_frame_burst << 16;
for (uint j = 0; j < 4; j++) this->share_owners[j] = COMPANY_SPECTATOR;
InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, INVALID_COMPANY);
@@ -266,9 +266,9 @@ void SubtractMoneyFromCompanyFract(CompanyID company, const CommandCost &cst)
void UpdateLandscapingLimits()
{
for (Company *c : Company::Iterate()) {
- c->terraform_limit = std::min<uint32>(c->terraform_limit + _settings_game.construction.terraform_per_64k_frames, _settings_game.construction.terraform_frame_burst << 16);
- c->clear_limit = std::min<uint32>(c->clear_limit + _settings_game.construction.clear_per_64k_frames, _settings_game.construction.clear_frame_burst << 16);
- c->tree_limit = std::min<uint32>(c->tree_limit + _settings_game.construction.tree_per_64k_frames, _settings_game.construction.tree_frame_burst << 16);
+ c->terraform_limit = std::min<uint32>(c->terraform_limit + _settings_game.construction.terraform_per_64k_frames, (uint32)_settings_game.construction.terraform_frame_burst << 16);
+ c->clear_limit = std::min<uint32>(c->clear_limit + _settings_game.construction.clear_per_64k_frames, (uint32)_settings_game.construction.clear_frame_burst << 16);
+ c->tree_limit = std::min<uint32>(c->tree_limit + _settings_game.construction.tree_per_64k_frames, (uint32)_settings_game.construction.tree_frame_burst << 16);
}
}