summaryrefslogtreecommitdiff
path: root/AK/NumberFormat.h
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2020-08-15 14:05:46 -0400
committerAndreas Kling <kling@serenityos.org>2020-08-16 16:33:28 +0200
commitaa9716673988597d270ee6223b42d5207fddc1ad (patch)
tree2e17b9cb0762f60865d8605552763fb49f596f5e /AK/NumberFormat.h
parent430b265cd45167fb2dca2323ea5f5b910be00a1d (diff)
downloadserenity-aa9716673988597d270ee6223b42d5207fddc1ad.zip
Everywhere: Consolidate human_readable_size() implementations
Let's use the one in AK/NumberFormat.h everywhere. It has slightly different behavior than some of the copies this removes, but it's probably nice to have uniform human readable size outputs across the system.
Diffstat (limited to 'AK/NumberFormat.h')
-rw-r--r--AK/NumberFormat.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/AK/NumberFormat.h b/AK/NumberFormat.h
index e3dd86a7fd..4fbb8d009a 100644
--- a/AK/NumberFormat.h
+++ b/AK/NumberFormat.h
@@ -31,6 +31,7 @@
namespace AK {
+// FIXME: Remove this hackery once printf() supports floats.
static String number_string_with_one_decimal(float number, const char* suffix)
{
float decimals = number - (int)number;