Codechange: Remove min/max functions in favour of STL variants (#8502)
This commit is contained in:
@@ -108,7 +108,7 @@ void SetDParamMaxValue(uint n, uint64 max_value, uint min_count, FontSize size)
|
||||
num_digits++;
|
||||
max_value /= 10;
|
||||
}
|
||||
SetDParamMaxDigits(n, max(min_count, num_digits), size);
|
||||
SetDParamMaxDigits(n, std::max(min_count, num_digits), size);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1663,7 +1663,7 @@ static char *GetSpecialNameString(char *buff, int ind, StringParameters *args, c
|
||||
{
|
||||
switch (ind) {
|
||||
case 1: // not used
|
||||
return strecpy(buff, _silly_company_names[min(args->GetInt32() & 0xFFFF, lengthof(_silly_company_names) - 1)], last);
|
||||
return strecpy(buff, _silly_company_names[std::min<uint>(args->GetInt32() & 0xFFFF, lengthof(_silly_company_names) - 1)], last);
|
||||
|
||||
case 2: // used for Foobar & Co company names
|
||||
return GenAndCoName(buff, args->GetInt32(), last);
|
||||
|
Reference in New Issue
Block a user