summaryrefslogtreecommitdiffstats
path: root/library/cpp/charset
diff options
context:
space:
mode:
authorspacelord <[email protected]>2022-02-10 16:48:15 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:48:15 +0300
commita0c6d9ad0cf6b94c527a15da147eb24335281b6d (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/charset
parent16747e4f77455cca4932df21eb76f12cb0a97a5c (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/charset')
-rw-r--r--library/cpp/charset/recyr_int.hh6
-rw-r--r--library/cpp/charset/wide.h14
2 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/charset/recyr_int.hh b/library/cpp/charset/recyr_int.hh
index 8354687c256..353af53305e 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 db4a178e7e7..32d30e849e9 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);