diff options
| author | Alexander Fokin <[email protected]> | 2022-02-10 16:45:38 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:38 +0300 |
| commit | bf9e69a933f89af083d895185f01ed65e4d90766 (patch) | |
| tree | b2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /util/stream/format.cpp | |
| parent | 863a59a65247c24db7cb06789bc5cf79d04da32f (diff) | |
Restoring authorship annotation for Alexander Fokin <[email protected]>. Commit 2 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 35b2c834449..3996130df5d 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 <> |
