From bf79b358c0e0224fb06e35a0286ef10671f0d075 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Fri, 6 Jun 2025 10:20:01 +1000 Subject: Update StarItemSlotWidget.cpp [skip ci] --- source/windowing/StarItemSlotWidget.cpp | 8 ++------ 1 file 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); -- cgit v1.2.3