aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/charset/wide.h
diff options
context:
space:
mode:
authorspacelord <spacelord@yandex-team.ru>2022-02-10 16:48:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:15 +0300
commit16747e4f77455cca4932df21eb76f12cb0a97a5c (patch)
tree4dd6da4102d99d0d69dec53c1050d290a850a9f2 /library/cpp/charset/wide.h
parenta817f5de12611ec73085eba17f8ec7740a46bdb7 (diff)
downloadydb-16747e4f77455cca4932df21eb76f12cb0a97a5c.tar.gz
Restoring authorship annotation for <spacelord@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/charset/wide.h')
-rw-r--r--library/cpp/charset/wide.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/charset/wide.h b/library/cpp/charset/wide.h
index 32d30e849e..db4a178e7e 100644
--- a/library/cpp/charset/wide.h
+++ b/library/cpp/charset/wide.h
@@ -121,8 +121,8 @@ namespace NDetail {
template <>
struct TRecodeTraits<char> {
- using TCharTo = wchar16;
- using TStringBufTo = TWtringBuf;
+ using TCharTo = wchar16;
+ using TStringBufTo = TWtringBuf;
using TStringTo = TUtf16String;
enum { ReserveSize = 4 }; // How many TCharFrom characters we should reserve for one TCharTo character in worst case
// Here an unicode character can be converted up to 4 bytes of UTF8
@@ -130,8 +130,8 @@ namespace NDetail {
template <>
struct TRecodeTraits<wchar16> {
- using TCharTo = char;
- using TStringBufTo = TStringBuf;
+ using TCharTo = char;
+ using TStringBufTo = TStringBuf;
using TStringTo = TString;
enum { ReserveSize = 2 }; // possible surrogate pairs ?
};
@@ -140,7 +140,7 @@ namespace NDetail {
template <typename TResult>
struct TRecodeResultOps {
// default implementation will work with TString and TUtf16String - 99% of usage
- using TResultChar = typename TResult::char_type;
+ using TResultChar = typename TResult::char_type;
static inline size_t Size(const TResult& dst) {
return dst.size();
@@ -160,7 +160,7 @@ namespace NDetail {
template <typename TCharFrom, typename TResult>
typename TRecodeTraits<TCharFrom>::TStringBufTo Recode(const TBasicStringBuf<TCharFrom> src, TResult& dst, ECharset encoding) {
- using TCharTo = typename TRecodeTraits<TCharFrom>::TCharTo;
+ using TCharTo = typename TRecodeTraits<TCharFrom>::TCharTo;
// make enough room for re-coded string
TCharTo* dstbuf = TRecodeResultOps<TResult>::Reserve(dst, src.size() * TRecodeTraits<TCharTo>::ReserveSize);
// do re-coding
@@ -173,7 +173,7 @@ namespace NDetail {
// appending version of Recode()
template <typename TCharFrom, typename TResult>
typename TRecodeTraits<TCharFrom>::TStringBufTo RecodeAppend(const TBasicStringBuf<TCharFrom> src, TResult& dst, ECharset encoding) {
- using TCharTo = typename TRecodeTraits<TCharFrom>::TCharTo;
+ using TCharTo = typename TRecodeTraits<TCharFrom>::TCharTo;
size_t dstOrigSize = TRecodeResultOps<TResult>::Size(dst);
TCharTo* dstbuf = TRecodeResultOps<TResult>::Reserve(dst, dstOrigSize + src.size() * TRecodeTraits<TCharTo>::ReserveSize);
TBasicStringBuf<TCharTo> appended = NBaseOps::Recode(src, dstbuf + dstOrigSize, encoding);