diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-06-12 16:25:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-12 16:25:10 +0200 |
commit | f410e7a8a9b14fd9f5c210afcc9e3519e9ce246d (patch) | |
tree | cf10eba4c066d50e8da3e73b4847113ce761dab4 | |
parent | 4073da7ddd0e1e899b5ae3f37b0281286016bfd6 (diff) | |
parent | 463d0988dd0738c6a4760128823e03a37d967513 (diff) | |
download | redot-engine-f410e7a8a9b14fd9f5c210afcc9e3519e9ce246d.tar.gz |
Merge pull request #29616 from Calinou/humanize-size-clearer-rounding
Make humanized size rounding clearer by padding decimals with zeroes
-rw-r--r-- | core/ustring.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 7ed23fa2c2..35b817b1d2 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -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 { |