Factor out function to get value with broadest digits
This commit is contained in:
@@ -116,14 +116,7 @@ void SetDParamMaxValue(uint n, uint64 max_value, uint min_count, FontSize size)
|
||||
*/
|
||||
void SetDParamMaxDigits(uint n, uint count, FontSize size)
|
||||
{
|
||||
uint front = 0;
|
||||
uint next = 0;
|
||||
GetBroadestDigit(&front, &next, size);
|
||||
uint64 val = count > 1 ? front : next;
|
||||
for (; count > 1; count--) {
|
||||
val = 10 * val + next;
|
||||
}
|
||||
SetDParam(n, val);
|
||||
SetDParam(n, GetBroadestDigitsValue(count, size));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user