diff options
author | Alexander Fokin <apfokin@gmail.com> | 2022-02-10 16:45:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:38 +0300 |
commit | 863a59a65247c24db7cb06789bc5cf79d04da32f (patch) | |
tree | 139dc000c8cd4a40f5659e421b7c75135d080307 /util/stream/format.cpp | |
parent | f64e95a9eb9ab03240599eb9581c5a9102426a96 (diff) | |
download | ydb-863a59a65247c24db7cb06789bc5cf79d04da32f.tar.gz |
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/stream/format.cpp')
-rw-r--r-- | util/stream/format.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/stream/format.cpp b/util/stream/format.cpp index 3996130df5..35b2c83444 100644 --- a/util/stream/format.cpp +++ b/util/stream/format.cpp @@ -38,10 +38,10 @@ namespace NFormatPrivate { template <> void Out<NFormatPrivate::THumanReadableSize>(IOutputStream& stream, const NFormatPrivate::THumanReadableSize& value) { - ui64 base = value.Format == SF_BYTES ? 1024 : 1000; - ui64 base2 = base * base; - ui64 base3 = base * base2; - ui64 base4 = base * base3; + ui64 base = value.Format == SF_BYTES ? 1024 : 1000; + ui64 base2 = base * base; + ui64 base3 = base * base2; + ui64 base4 = base * base3; double v = value.Value; if (v < 0) { @@ -61,13 +61,13 @@ void Out<NFormatPrivate::THumanReadableSize>(IOutputStream& stream, const NForma NFormatPrivate::PrintDoubleShortly(stream, v / (double)base4) << 'T'; } - if (value.Format == SF_BYTES) { + if (value.Format == SF_BYTES) { if (v < base) { - stream << "B"; - } else { - stream << "iB"; - } - } + stream << "B"; + } else { + stream << "iB"; + } + } } template <> |