aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/unicode/normalization
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /library/cpp/unicode/normalization
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/unicode/normalization')
-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
5 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/unicode/normalization/custom_encoder.cpp b/library/cpp/unicode/normalization/custom_encoder.cpp
index c6f186405f..7227902791 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 7cc4dc7b75..8a93147d09 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 7da7211514..de7625abea 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 4f5f57881c..f458e85b7e 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 54d4940a26..6f9eb3ef6c 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>();
}
}