diff options
author | tobo <tobo@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
commit | 7fe839092527589b38f014d854c51565b3c1adfa (patch) | |
tree | 309e97022d3530044b712b8f71318c78faf7856e /util/charset | |
parent | d0d68c395c10da4cb56a1c845504570a04d7893e (diff) | |
download | ydb-7fe839092527589b38f014d854c51565b3c1adfa.tar.gz |
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/charset')
-rw-r--r-- | util/charset/generated/unidata.cpp | 2 | ||||
-rw-r--r-- | util/charset/utf8_ut.cpp | 10 | ||||
-rw-r--r-- | util/charset/wide.h | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/util/charset/generated/unidata.cpp b/util/charset/generated/unidata.cpp index 6f5adbbc0a..ea2158ab80 100644 --- a/util/charset/generated/unidata.cpp +++ b/util/charset/generated/unidata.cpp @@ -1,7 +1,7 @@ #include <util/charset/unidata.h> namespace { namespace NUnidataTableGenerated { - using TV = const NUnicode::NPrivate::TUnidataTable::TStored; + using TV = const NUnicode::NPrivate::TUnidataTable::TStored; static const TV V[] = { #undef V0 diff --git a/util/charset/utf8_ut.cpp b/util/charset/utf8_ut.cpp index 9e68881cca..fab9164e49 100644 --- a/util/charset/utf8_ut.cpp +++ b/util/charset/utf8_ut.cpp @@ -15,7 +15,7 @@ Y_UNIT_TEST_SUITE(TUtfUtilTest) { Y_UNIT_TEST(TestToLowerUtfString) { UNIT_ASSERT_VALUES_EQUAL(ToLowerUTF8("xyz XYZ ПРИВЕТ!"), "xyz xyz привет!"); - UNIT_ASSERT_VALUES_EQUAL(ToLowerUTF8(TStringBuf("xyz")), "xyz"); + UNIT_ASSERT_VALUES_EQUAL(ToLowerUTF8(TStringBuf("xyz")), "xyz"); { TString s = "привет!"; @@ -55,7 +55,7 @@ Y_UNIT_TEST_SUITE(TUtfUtilTest) { Y_UNIT_TEST(TestToUpperUtfString) { UNIT_ASSERT_VALUES_EQUAL(ToUpperUTF8("xyz XYZ привет!"), "XYZ XYZ ПРИВЕТ!"); - UNIT_ASSERT_VALUES_EQUAL(ToUpperUTF8(TStringBuf("XYZ")), "XYZ"); + UNIT_ASSERT_VALUES_EQUAL(ToUpperUTF8(TStringBuf("XYZ")), "XYZ"); { TString s = "ПРИВЕТ!"; @@ -93,7 +93,7 @@ Y_UNIT_TEST_SUITE(TUtfUtilTest) { } Y_UNIT_TEST(TestUTF8ToWide) { - TFileInput in(ArcadiaSourceRoot() + TStringBuf("/util/charset/ut/utf8/test1.txt")); + TFileInput in(ArcadiaSourceRoot() + TStringBuf("/util/charset/ut/utf8/test1.txt")); TString text = in.ReadAll(); UNIT_ASSERT(WideToUTF8(UTF8ToWide(text)) == text); @@ -101,7 +101,7 @@ Y_UNIT_TEST_SUITE(TUtfUtilTest) { Y_UNIT_TEST(TestInvalidUTF8) { TVector<TString> testData; - TFileInput input(ArcadiaSourceRoot() + TStringBuf("/util/charset/ut/utf8/invalid_UTF8.bin")); + TFileInput input(ArcadiaSourceRoot() + TStringBuf("/util/charset/ut/utf8/invalid_UTF8.bin")); Load(&input, testData); for (const auto& text : testData) { @@ -110,7 +110,7 @@ Y_UNIT_TEST_SUITE(TUtfUtilTest) { } Y_UNIT_TEST(TestUTF8ToWideScalar) { - TFileInput in(ArcadiaSourceRoot() + TStringBuf("/util/charset/ut/utf8/test1.txt")); + TFileInput in(ArcadiaSourceRoot() + TStringBuf("/util/charset/ut/utf8/test1.txt")); TString text = in.ReadAll(); TUtf16String wtextSSE = UTF8ToWide(text); diff --git a/util/charset/wide.h b/util/charset/wide.h index 04e6928aab..fce8ed500b 100644 --- a/util/charset/wide.h +++ b/util/charset/wide.h @@ -815,10 +815,10 @@ void EscapeHtmlChars(TUtf16String& str); //! returns number of characters in range. Handle surrogate pairs as one character. inline size_t CountWideChars(const wchar16* b, const wchar16* e) { size_t count = 0; - Y_ENSURE(b <= e, TStringBuf("invalid iterators")); + Y_ENSURE(b <= e, TStringBuf("invalid iterators")); while (b < e) { b = SkipSymbol(b, e); - ++count; + ++count; } return count; } @@ -829,7 +829,7 @@ inline size_t CountWideChars(const TWtringBuf str) { //! checks whether the range is valid UTF-16 sequence inline bool IsValidUTF16(const wchar16* b, const wchar16* e) { - Y_ENSURE(b <= e, TStringBuf("invalid iterators")); + Y_ENSURE(b <= e, TStringBuf("invalid iterators")); while (b < e) { wchar32 symbol = ReadSymbolAndAdvance(b, e); if (symbol == BROKEN_RUNE) |