summaryrefslogtreecommitdiff
path: root/src/company_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/company_cmd.cpp')
-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 1ecdaf89a..5a6a114e7 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -265,9 +265,9 @@ void SubtractMoneyFromCompanyFract(CompanyID company, const CommandCost &cst)
void UpdateLandscapingLimits()
{
for (Company *c : Company::Iterate()) {
- c->terraform_limit = min(c->terraform_limit + _settings_game.construction.terraform_per_64k_frames, (uint32)_settings_game.construction.terraform_frame_burst << 16);
- c->clear_limit = min(c->clear_limit + _settings_game.construction.clear_per_64k_frames, (uint32)_settings_game.construction.clear_frame_burst << 16);
- c->tree_limit = min(c->tree_limit + _settings_game.construction.tree_per_64k_frames, (uint32)_settings_game.construction.tree_frame_burst << 16);
+ 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);
}
}
@@ -554,7 +554,7 @@ Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY)
ResetCompanyLivery(c);
_company_colours[c->index] = (Colours)c->colour;
- c->money = c->current_loan = (min(INITIAL_LOAN, _economy.max_loan) * _economy.inflation_prices >> 16) / 50000 * 50000;
+ c->money = c->current_loan = (std::min<int64>(INITIAL_LOAN, _economy.max_loan) * _economy.inflation_prices >> 16) / 50000 * 50000;
c->share_owners[0] = c->share_owners[1] = c->share_owners[2] = c->share_owners[3] = INVALID_OWNER;
@@ -708,7 +708,7 @@ void OnTick_Companies()
if (_next_competitor_start == 0) {
/* AI::GetStartNextTime() can return 0. */
- _next_competitor_start = max(1, AI::GetStartNextTime() * DAY_TICKS);
+ _next_competitor_start = std::max(1, AI::GetStartNextTime() * DAY_TICKS);
}
if (_game_mode != GM_MENU && AI::CanStartNew() && --_next_competitor_start == 0) {
@@ -1198,7 +1198,7 @@ CommandCost CmdGiveMoney(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
if (!_settings_game.economy.give_money) return CMD_ERROR;
const Company *c = Company::Get(_current_company);
- CommandCost amount(EXPENSES_OTHER, min((Money)p1, (Money)20000000LL));
+ CommandCost amount(EXPENSES_OTHER, std::min<Money>(p1, 20000000LL));
CompanyID dest_company = (CompanyID)p2;
/* You can only transfer funds that is in excess of your loan */