mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 08:52:40 +01:00
Codechange: Return pair from GetBroadestDigit instead of out parameters.
This commit is contained in:
committed by
Peter Nelson
parent
9a8d9e4e48
commit
4c99b5b368
@@ -201,9 +201,7 @@ void SetDParamMaxValue(size_t n, uint64_t max_value, uint min_count, FontSize si
|
||||
*/
|
||||
void SetDParamMaxDigits(size_t n, uint count, FontSize size)
|
||||
{
|
||||
uint front = 0;
|
||||
uint next = 0;
|
||||
GetBroadestDigit(&front, &next, size);
|
||||
auto [front, next] = GetBroadestDigit(size);
|
||||
uint64_t val = count > 1 ? front : next;
|
||||
for (; count > 1; count--) {
|
||||
val = 10 * val + next;
|
||||
|
||||
Reference in New Issue
Block a user