1
0
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:
Peter Nelson
2025-02-21 23:38:33 +00:00
committed by Peter Nelson
parent 9a8d9e4e48
commit 4c99b5b368
3 changed files with 15 additions and 13 deletions

View File

@@ -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;