diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2025-06-06 10:20:01 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2025-06-06 10:20:01 +1000 |
commit | bf79b358c0e0224fb06e35a0286ef10671f0d075 (patch) | |
tree | f8df870e9103f52e282cf1e788b65e0924b4c56e | |
parent | 4c34d17e57285cc67e9256fcb024101356f30129 (diff) |
Update StarItemSlotWidget.cpp
[skip ci]
-rw-r--r-- | source/windowing/StarItemSlotWidget.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/windowing/StarItemSlotWidget.cpp b/source/windowing/StarItemSlotWidget.cpp index ffd7da1..82407be 100644 --- a/source/windowing/StarItemSlotWidget.cpp +++ b/source/windowing/StarItemSlotWidget.cpp @@ -14,8 +14,8 @@ static String formatShortSize(uint64_t n) { if (n < 10000) return toString(n); - uint64_t divisor; - char suffix; + uint64_t divisor = 1000ull; + char suffix = 'k'; if (n >= 1000000000000000ull) { divisor = 1000000000000000ull; @@ -29,13 +29,9 @@ static String formatShortSize(uint64_t n) { } else if (n >= 1000000ull) { divisor = 1000000ull; suffix = 'm'; - } else { - divisor = 1000ull; - suffix = 'k'; } uint64_t whole = n / divisor; - if (whole >= 100ull) return strf("{}{:c}", whole, suffix); |