mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-13 06:12:49 -06:00
CtrlLib: Improved filesize formatting (thanks klugier)
git-svn-id: svn://ultimatepp.org/upp/trunk@6157 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
9647cb1b7e
commit
243ed78eb3
1 changed files with 3 additions and 3 deletions
|
|
@ -1117,12 +1117,12 @@ String FormatFileSize(int64 n)
|
|||
return Format("%d B ", n);
|
||||
else
|
||||
if(n < 10000 * 1024)
|
||||
return Format("%d K ", n >> 10);
|
||||
return Format("%d.%d K ", n >> 10, (n & 1023) / 103);
|
||||
else
|
||||
if(n < I64(10000000) * 1024)
|
||||
return Format("%d M ", n >> 20);
|
||||
return Format("%d.%d M ", n >> 20, (n & 1023) / 103);
|
||||
else
|
||||
return Format("%d G ", n >> 30);
|
||||
return Format("%d.%d G ", n >> 30, (n & 1023) / 103);
|
||||
}
|
||||
|
||||
void FileSel::Update() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue