1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:27:35 +00:00

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.
This commit is contained in:
Nico Weber 2020-08-15 14:05:46 -04:00 committed by Andreas Kling
parent 430b265cd4
commit aa97166739
5 changed files with 10 additions and 65 deletions

View file

@ -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;