aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/unicode
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/unicode
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/unicode')
-rw-r--r--library/cpp/unicode/normalization/custom_encoder.cpp6
-rw-r--r--library/cpp/unicode/normalization/generated/composition.cpp2
-rw-r--r--library/cpp/unicode/normalization/normalization.cpp2
-rw-r--r--library/cpp/unicode/normalization/normalization.h12
-rw-r--r--library/cpp/unicode/normalization/ut/normalization_ut.cpp10
-rw-r--r--library/cpp/unicode/punycode/punycode.cpp2
-rw-r--r--library/cpp/unicode/punycode/punycode_ut.cpp6
7 files changed, 20 insertions, 20 deletions
diff --git a/library/cpp/unicode/normalization/custom_encoder.cpp b/library/cpp/unicode/normalization/custom_encoder.cpp
index 7227902791..c6f186405f 100644
--- a/library/cpp/unicode/normalization/custom_encoder.cpp
+++ b/library/cpp/unicode/normalization/custom_encoder.cpp
@@ -15,7 +15,7 @@ void TCustomEncoder::addToTable(wchar32 ucode, unsigned char code, const CodePag
if (Table[plane][pos] == 0) {
Table[plane][pos] = code;
} else {
- Y_ASSERT(target && *target->Names);
+ Y_ASSERT(target && *target->Names);
if (static_cast<unsigned char>(Table[plane][pos]) > 127 && code) {
Cerr << "WARNING: Only lower part of ASCII should have duplicate encodings "
<< target->Names[0]
@@ -37,7 +37,7 @@ bool isGoodDecomp(wchar32 rune, wchar32 decomp) {
}
void TCustomEncoder::Create(const CodePage* target, bool extended) {
- Y_ASSERT(target);
+ Y_ASSERT(target);
DefaultChar = (const char*)target->DefaultChar;
@@ -61,7 +61,7 @@ void TCustomEncoder::Create(const CodePage* target, bool extended) {
wchar32 dw = w;
while (IsComposed(dw) && Code(dw) == 0) {
const wchar32* decomp_p = NUnicode::Decomposition<true>(dw);
- Y_ASSERT(decomp_p != nullptr);
+ Y_ASSERT(decomp_p != nullptr);
dw = decomp_p[0];
if (std::char_traits<wchar32>::length(decomp_p) > 1 && (dw == (wchar32)' ' || dw == (wchar32)'('))
diff --git a/library/cpp/unicode/normalization/generated/composition.cpp b/library/cpp/unicode/normalization/generated/composition.cpp
index 8a93147d09..7cc4dc7b75 100644
--- a/library/cpp/unicode/normalization/generated/composition.cpp
+++ b/library/cpp/unicode/normalization/generated/composition.cpp
@@ -947,4 +947,4 @@ const NUnicode::NPrivate::TComposition::TRawData NUnicode::NPrivate::TCompositio
{ 0x115B9, 0x115AF, 0x115BB },
}; // TRawData
-const size_t NUnicode::NPrivate::TComposition::RawDataSize = Y_ARRAY_SIZE(NUnicode::NPrivate::TComposition::RawData);
+const size_t NUnicode::NPrivate::TComposition::RawDataSize = Y_ARRAY_SIZE(NUnicode::NPrivate::TComposition::RawData);
diff --git a/library/cpp/unicode/normalization/normalization.cpp b/library/cpp/unicode/normalization/normalization.cpp
index de7625abea..7da7211514 100644
--- a/library/cpp/unicode/normalization/normalization.cpp
+++ b/library/cpp/unicode/normalization/normalization.cpp
@@ -56,7 +56,7 @@ NUnicode::NPrivate::TComposition::TComposition() {
while (*decompBegin) {
wchar32 tail = *(decompBegin++);
wchar32 comp = ComposeHangul(lead, tail);
- Y_ASSERT(comp != 0);
+ Y_ASSERT(comp != 0);
Data[TKey(lead, tail)] = comp;
diff --git a/library/cpp/unicode/normalization/normalization.h b/library/cpp/unicode/normalization/normalization.h
index f458e85b7e..4f5f57881c 100644
--- a/library/cpp/unicode/normalization/normalization.h
+++ b/library/cpp/unicode/normalization/normalization.h
@@ -136,7 +136,7 @@ namespace NUnicode {
class TCompositor<false> {
public:
inline void DoComposition(TBuffer& buffer) {
- Y_UNUSED(buffer);
+ Y_UNUSED(buffer);
}
};
@@ -182,7 +182,7 @@ namespace NUnicode {
}
} while (oneMoreTurnPlease);
- Y_ASSERT(DecompositionCombining(lead) == 0);
+ Y_ASSERT(DecompositionCombining(lead) == 0);
buffer[0] = TSymbol(lead, 0);
}
};
@@ -280,7 +280,7 @@ namespace NUnicode {
const wchar32* decompBegin = Decompositor.Decomposition(c);
if (decompBegin) {
while (*decompBegin) {
- Y_ASSERT(Decompositor.Decomposition(*decompBegin) == nullptr);
+ Y_ASSERT(Decompositor.Decomposition(*decompBegin) == nullptr);
AddCharNoDecomposition(*(decompBegin++), out);
}
return;
@@ -377,8 +377,8 @@ inline TBasicString<TCharType> Normalize(const TBasicString<TCharType>& str) {
::NUnicode::TNormalizer<N> dec;
return dec.Normalize(str);
}
-
+
template <NUnicode::ENormalization N, typename TCharType>
inline TBasicString<TCharType> Normalize(const TBasicStringBuf<TCharType> str) {
- return Normalize<N>(str.data(), str.size());
-}
+ return Normalize<N>(str.data(), str.size());
+}
diff --git a/library/cpp/unicode/normalization/ut/normalization_ut.cpp b/library/cpp/unicode/normalization/ut/normalization_ut.cpp
index 6f9eb3ef6c..54d4940a26 100644
--- a/library/cpp/unicode/normalization/ut/normalization_ut.cpp
+++ b/library/cpp/unicode/normalization/ut/normalization_ut.cpp
@@ -4,7 +4,7 @@
#include <library/cpp/unicode/normalization/normalization.h>
-Y_UNIT_TEST_SUITE(TUnicodeNormalizationTest) {
+Y_UNIT_TEST_SUITE(TUnicodeNormalizationTest) {
template <NUnicode::ENormalization NormType>
void TestInit() {
NUnicode::TNormalizer<NormType> normalizer;
@@ -14,19 +14,19 @@ Y_UNIT_TEST_SUITE(TUnicodeNormalizationTest) {
normalizer.Normalize(w);
}
- Y_UNIT_TEST(TestInitNFD) {
+ Y_UNIT_TEST(TestInitNFD) {
TestInit<NUnicode::NFD>();
}
- Y_UNIT_TEST(TestInitNFC) {
+ Y_UNIT_TEST(TestInitNFC) {
TestInit<NUnicode::NFC>();
}
- Y_UNIT_TEST(TestInitNFKD) {
+ Y_UNIT_TEST(TestInitNFKD) {
TestInit<NUnicode::NFKD>();
}
- Y_UNIT_TEST(TestInitNFKC) {
+ Y_UNIT_TEST(TestInitNFKC) {
TestInit<NUnicode::NFKC>();
}
}
diff --git a/library/cpp/unicode/punycode/punycode.cpp b/library/cpp/unicode/punycode/punycode.cpp
index e2b9bab2a2..800d1f19fe 100644
--- a/library/cpp/unicode/punycode/punycode.cpp
+++ b/library/cpp/unicode/punycode/punycode.cpp
@@ -135,7 +135,7 @@ bool CanBePunycodeHostName(const TStringBuf& host) {
TStringBuf tail(host);
while (tail) {
const TStringBuf label = tail.NextTok('.');
- if (label.StartsWith(ACE))
+ if (label.StartsWith(ACE))
return true;
}
diff --git a/library/cpp/unicode/punycode/punycode_ut.cpp b/library/cpp/unicode/punycode/punycode_ut.cpp
index 1423e540a5..97271cf0d8 100644
--- a/library/cpp/unicode/punycode/punycode_ut.cpp
+++ b/library/cpp/unicode/punycode/punycode_ut.cpp
@@ -10,7 +10,7 @@ namespace {
}
}
-Y_UNIT_TEST_SUITE(TPunycodeTest) {
+Y_UNIT_TEST_SUITE(TPunycodeTest) {
static bool TestRaw(const TString& utf8, const TString& punycode) {
TUtf16String unicode = UTF8ToWide(utf8);
TString buf1;
@@ -18,7 +18,7 @@ Y_UNIT_TEST_SUITE(TPunycodeTest) {
return HasSameBuffer(WideToPunycode(unicode, buf1), buf1) && buf1 == punycode && HasSameBuffer(PunycodeToWide(punycode, buf2), buf2) && buf2 == unicode && WideToPunycode(unicode) == punycode && PunycodeToWide(punycode) == unicode;
}
- Y_UNIT_TEST(RawEncodeDecode) {
+ Y_UNIT_TEST(RawEncodeDecode) {
UNIT_ASSERT(TestRaw("", ""));
UNIT_ASSERT(TestRaw(" ", " -"));
UNIT_ASSERT(TestRaw("-", "--"));
@@ -70,7 +70,7 @@ Y_UNIT_TEST_SUITE(TPunycodeTest) {
return ForceHostNameToPunycode(UTF8ToWide(bad)) == bad && ForcePunycodeToHostName(bad) == UTF8ToWide(bad);
}
- Y_UNIT_TEST(HostNameEncodeDecode) {
+ Y_UNIT_TEST(HostNameEncodeDecode) {
UNIT_ASSERT(TestHostName("президент.рф", "xn--d1abbgf6aiiy.xn--p1ai", true));
UNIT_ASSERT(TestHostName("яндекс.ru", "xn--d1acpjx3f.ru", true));
UNIT_ASSERT(TestHostName("пример", "xn--e1afmkfd", true));