diff options
Diffstat (limited to 'coding')
-rw-r--r-- | coding/multilang_utf8_string.hpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/coding/multilang_utf8_string.hpp b/coding/multilang_utf8_string.hpp index fa8c1216d9..7381f2b8dd 100644 --- a/coding/multilang_utf8_string.hpp +++ b/coding/multilang_utf8_string.hpp @@ -9,24 +9,24 @@ namespace utils { - template <class TSink> void WriteString(TSink & sink, string const & s) - { - CHECK(!s.empty(), ()); +template <class TSink> void WriteString(TSink & sink, string const & s) +{ + CHECK(!s.empty(), ()); - size_t const sz = s.size(); - WriteVarUint(sink, static_cast<uint32_t>(sz-1)); - sink.Write(s.c_str(), sz); - } + size_t const sz = s.size(); + WriteVarUint(sink, static_cast<uint32_t>(sz-1)); + sink.Write(s.c_str(), sz); +} - template <class TSource> void ReadString(TSource & src, string & s) - { - uint32_t const sz = ReadVarUint<uint32_t>(src) + 1; - s.resize(sz); - src.Read(&s[0], sz); +template <class TSource> void ReadString(TSource & src, string & s) +{ + uint32_t const sz = ReadVarUint<uint32_t>(src) + 1; + s.resize(sz); + src.Read(&s[0], sz); - CHECK(!s.empty(), ()); - } + CHECK(!s.empty(), ()); } +} // namespace utils class StringUtf8Multilang { |