diff options
author | spacelord <[email protected]> | 2022-02-10 16:48:15 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:15 +0300 |
commit | 16747e4f77455cca4932df21eb76f12cb0a97a5c (patch) | |
tree | 4dd6da4102d99d0d69dec53c1050d290a850a9f2 /library/cpp/charset | |
parent | a817f5de12611ec73085eba17f8ec7740a46bdb7 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/charset')
-rw-r--r-- | library/cpp/charset/recyr_int.hh | 6 | ||||
-rw-r--r-- | library/cpp/charset/wide.h | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/charset/recyr_int.hh b/library/cpp/charset/recyr_int.hh index 353af53305e..8354687c256 100644 --- a/library/cpp/charset/recyr_int.hh +++ b/library/cpp/charset/recyr_int.hh @@ -178,19 +178,19 @@ namespace NCodepagePrivate { template <class TCharType> struct TCharTypeSwitch<TCharType, 2> { - using TRealCharType = wchar16; + using TRealCharType = wchar16; }; template <class TCharType> struct TCharTypeSwitch<TCharType, 4> { - using TRealCharType = wchar32; + using TRealCharType = wchar32; }; template <class TCharType> inline RECODE_RESULT _recodeUnicodeToUTF8(const TCharType* in, char* out, size_t in_size, size_t out_size, size_t& in_readed, size_t& out_writed) { static_assert(sizeof(TCharType) > 1, "expect some wide type"); - using TRealCharType = typename TCharTypeSwitch<TCharType>::TRealCharType; + using TRealCharType = typename TCharTypeSwitch<TCharType>::TRealCharType; return _recodeUnicodeToUTF8Impl(reinterpret_cast<const TRealCharType*>(in), out, in_size, out_size, in_readed, out_writed); } diff --git a/library/cpp/charset/wide.h b/library/cpp/charset/wide.h index 32d30e849e9..db4a178e7e7 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); |