Merge pull request #29616 from Calinou/humanize-size-clearer-rounding
Make humanized size rounding clearer by padding decimals with zeroes
This commit is contained in:
commit
f410e7a8a9
1 changed files with 1 additions and 1 deletions
|
@ -3232,7 +3232,7 @@ String String::humanize_size(size_t p_size) {
|
|||
int digits = prefix_idx > 0 ? _humanize_digits(p_size / _div) : 0;
|
||||
double divisor = prefix_idx > 0 ? _div : 1;
|
||||
|
||||
return String::num(p_size / divisor, digits) + prefix[prefix_idx];
|
||||
return String::num(p_size / divisor).pad_decimals(digits) + prefix[prefix_idx];
|
||||
}
|
||||
bool String::is_abs_path() const {
|
||||
|
||||
|
|
Loading…
Reference in a new issue