mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 05:47:34 +00:00
AK: Rename KB, MB, GB to KiB, MiB, GiB
The SI prefixes "k", "M", "G" mean "10^3", "10^6", "10^9". The IEC prefixes "Ki", "Mi", "Gi" mean "2^10", "2^20", "2^30". Let's use the correct name, at least in code. Only changes the name of the constants, no other behavior change.
This commit is contained in:
parent
a68650a7b4
commit
430b265cd4
31 changed files with 69 additions and 69 deletions
|
@ -63,13 +63,13 @@
|
|||
|
||||
static String human_readable_size(u32 size)
|
||||
{
|
||||
if (size < (64 * KB))
|
||||
if (size < (64 * KiB))
|
||||
return String::format("%u", size);
|
||||
if (size < MB)
|
||||
return String::format("%u KB", size / KB);
|
||||
if (size < GB)
|
||||
return String::format("%u MB", size / MB);
|
||||
return String::format("%u GB", size / GB);
|
||||
if (size < MiB)
|
||||
return String::format("%u KB", size / KiB);
|
||||
if (size < GiB)
|
||||
return String::format("%u MB", size / MiB);
|
||||
return String::format("%u GB", size / GiB);
|
||||
}
|
||||
|
||||
static NonnullRefPtr<GUI::Widget> build_file_systems_tab();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue