aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorMichael Dusan <michael.dusan@gmail.com>2019-11-25 15:04:49 -0500
committerMichael Dusan <michael.dusan@gmail.com>2019-11-25 15:04:49 -0500
commita647a88dfc6cdef66316399f10084b35f738b093 (patch)
tree8b2ea8968a6e273bf4a7b052a8bceb0eadcab1b6 /src/util.cpp
parent8f3e972da6badf6df82c88ba0c60aca7b545f62c (diff)
downloadzig-a647a88dfc6cdef66316399f10084b35f738b093.tar.gz
zig-a647a88dfc6cdef66316399f10084b35f738b093.zip
const interning for 1-possible-value types
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.cpp b/src/util.cpp
index d3dc57e098..56f1de9839 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -121,18 +121,18 @@ SplitIterator memSplit(Slice<uint8_t> buffer, Slice<uint8_t> split_bytes) {
void zig_pretty_print_bytes(FILE *f, double n) {
if (n > 1024.0 * 1024.0 * 1024.0) {
- fprintf(f, "%.02f GiB", n / 1024.0 / 1024.0 / 1024.0);
+ fprintf(f, "%.03f GiB", n / 1024.0 / 1024.0 / 1024.0);
return;
}
if (n > 1024.0 * 1024.0) {
- fprintf(f, "%.02f MiB", n / 1024.0 / 1024.0);
+ fprintf(f, "%.03f MiB", n / 1024.0 / 1024.0);
return;
}
if (n > 1024.0) {
- fprintf(f, "%.02f KiB", n / 1024.0);
+ fprintf(f, "%.03f KiB", n / 1024.0);
return;
}
- fprintf(f, "%.02f bytes", n );
+ fprintf(f, "%.03f bytes", n );
return;
}