run modernize

This commit is contained in:
Kovid Goyal
2025-11-11 17:09:37 +05:30
parent 1faf786bd2
commit 6f588a0c29
30 changed files with 46 additions and 60 deletions

View File

@@ -21,10 +21,7 @@ func num_to_string(number *big.Int, alphabet []rune, alphabet_len *big.Int, pad_
if number.Sign() < 0 {
*number = zero
}
capacity := 64
if pad_to_length > capacity {
capacity = pad_to_length
}
capacity := max(pad_to_length, 64)
ans := make([]rune, 0, capacity)
for number.Cmp(&zero) == 1 {
number.DivMod(number, alphabet_len, &digit)