diff options
author | danlark <danlark@yandex-team.ru> | 2022-02-10 16:46:10 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:10 +0300 |
commit | baa58daefa91fde4b4769facdbd2903763b9c6a8 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/codecs/solar_codec.h | |
parent | 3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (diff) | |
download | ydb-baa58daefa91fde4b4769facdbd2903763b9c6a8.tar.gz |
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/codecs/solar_codec.h')
-rw-r--r-- | library/cpp/codecs/solar_codec.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/codecs/solar_codec.h b/library/cpp/codecs/solar_codec.h index 71d606a01c5..7158ae79262 100644 --- a/library/cpp/codecs/solar_codec.h +++ b/library/cpp/codecs/solar_codec.h @@ -31,7 +31,7 @@ namespace NCodecs { if (!(b & 0x80)) { value = result; return; - } else if (Y_UNLIKELY(r.empty())) { + } else if (Y_UNLIKELY(r.empty())) { break; } } @@ -54,7 +54,7 @@ namespace NCodecs { ui32 result = static_cast<ui8>(r[0]); r.Skip(1); if (result >= 0x80) { - Y_ENSURE_EX(!r.empty(), TCodecException() << "Bad data"); + Y_ENSURE_EX(!r.empty(), TCodecException() << "Bad data"); result = ((result << 8) & 0x7FFF) | static_cast<ui8>(r[0]); r.Skip(1); } @@ -140,8 +140,8 @@ namespace NCodecs { template <class TTraits> Y_FORCE_INLINE void EncodeImpl(TStringBuf r, TBuffer& b) const { b.Clear(); - b.Reserve(r.size()); - while (!r.empty()) { + b.Reserve(r.size()); + while (!r.empty()) { size_t sz = 0; ui32 val = (ui32)-1; Encoder.FindLongestPrefix(r, &sz, &val); @@ -153,12 +153,12 @@ namespace NCodecs { template <class TTraits> Y_FORCE_INLINE void DecodeImpl(TStringBuf r, TBuffer& b) const { b.Clear(); - b.Reserve(r.size()); + b.Reserve(r.size()); ui32 v = 0; - while (!r.empty()) { + while (!r.empty()) { TTraits::Read(r, v); TStringBuf s = DoDecode(v); - b.Append(s.data(), s.size()); + b.Append(s.data(), s.size()); } } |