aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/charset
diff options
context:
space:
mode:
authoreeight <eeight@yandex-team.ru>2022-02-10 16:46:18 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:18 +0300
commit475c0a46f28166e83fd263badc7546377cddcabe (patch)
tree39c5a49b8aaad78fe390b6f1f2886bdbda40f3e7 /library/cpp/charset
parenta6e0145a095c7bb3770d6e07aee301de5c73f96e (diff)
downloadydb-475c0a46f28166e83fd263badc7546377cddcabe.tar.gz
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/charset')
-rw-r--r--library/cpp/charset/ci_string.cpp6
-rw-r--r--library/cpp/charset/ci_string.h2
-rw-r--r--library/cpp/charset/ci_string_ut.cpp4
-rw-r--r--library/cpp/charset/codepage.cpp14
-rw-r--r--library/cpp/charset/ut/ya.make2
-rw-r--r--library/cpp/charset/wide_ut.cpp6
6 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/charset/ci_string.cpp b/library/cpp/charset/ci_string.cpp
index 6097e40131..a3c546ab3f 100644
--- a/library/cpp/charset/ci_string.cpp
+++ b/library/cpp/charset/ci_string.cpp
@@ -1,15 +1,15 @@
#include "ci_string.h"
int TCiString::compare(const TCiString& s1, const TCiString& s2, const CodePage& cp) {
- return cp.stricmp(s1.data(), s2.data());
+ return cp.stricmp(s1.data(), s2.data());
}
int TCiString::compare(const char* p, const TCiString& s2, const CodePage& cp) {
- return cp.stricmp(p, s2.data());
+ return cp.stricmp(p, s2.data());
}
int TCiString::compare(const TCiString& s1, const char* p, const CodePage& cp) {
- return cp.stricmp(s1.data(), p);
+ return cp.stricmp(s1.data(), p);
}
int TCiString::compare(const TStringBuf& p1, const TStringBuf& p2, const CodePage& cp) {
diff --git a/library/cpp/charset/ci_string.h b/library/cpp/charset/ci_string.h
index edf24c1b6f..4756379808 100644
--- a/library/cpp/charset/ci_string.h
+++ b/library/cpp/charset/ci_string.h
@@ -209,7 +209,7 @@ public:
static size_t hashVal(const char* pc, size_t len, const CodePage& cp = csYandex);
size_t hash() const {
- return TCiString::hashVal(data(), length());
+ return TCiString::hashVal(data(), length());
}
};
diff --git a/library/cpp/charset/ci_string_ut.cpp b/library/cpp/charset/ci_string_ut.cpp
index 3d2a53d5fe..c1d979d93a 100644
--- a/library/cpp/charset/ci_string_ut.cpp
+++ b/library/cpp/charset/ci_string_ut.cpp
@@ -1,13 +1,13 @@
#include "ci_string.h"
-#include <util/generic/hash.h>
+#include <util/generic/hash.h>
#include <util/generic/string_ut.h>
class TCaseStringTest: public TTestBase, private TStringTestImpl<TCiString, TTestData<char>> {
public:
void TestSpecial() {
TCiString ss = Data._0123456(); // type 'TCiString' is used as is
- size_t hash_val = ComputeHash(ss);
+ size_t hash_val = ComputeHash(ss);
UNIT_ASSERT(hash_val == 1489244);
}
diff --git a/library/cpp/charset/codepage.cpp b/library/cpp/charset/codepage.cpp
index 0431bef31b..a9b64bdd64 100644
--- a/library/cpp/charset/codepage.cpp
+++ b/library/cpp/charset/codepage.cpp
@@ -6,7 +6,7 @@
#include <util/string/cast.h>
#include <util/string/subst.h>
#include <util/string/util.h>
-#include <util/system/hi_lo.h>
+#include <util/system/hi_lo.h>
#include <util/system/yassert.h>
#include <util/generic/hash.h>
#include <util/generic/string.h>
@@ -256,8 +256,8 @@ void DoDecodeUnknownPlane(TxChar* str, TxChar*& ee, const ECharset enc) {
if (SingleByteCodepage(enc)) {
const CodePage* cp = CodePageByCharset(enc);
for (TxChar* s = str; s < e; s++) {
- if (Hi8(Lo16(*s)) == 0xF0)
- *s = (TxChar)cp->unicode[Lo8(Lo16(*s))]; // NOT mb compliant
+ if (Hi8(Lo16(*s)) == 0xF0)
+ *s = (TxChar)cp->unicode[Lo8(Lo16(*s))]; // NOT mb compliant
}
} else if (enc == CODES_UTF8) {
TxChar* s;
@@ -276,8 +276,8 @@ void DoDecodeUnknownPlane(TxChar* str, TxChar*& ee, const ECharset enc) {
e = d;
} else if (enc == CODES_UNKNOWN) {
for (TxChar* s = str; s < e; s++) {
- if (Hi8(Lo16(*s)) == 0xF0)
- *s = Lo8(Lo16(*s));
+ if (Hi8(Lo16(*s)) == 0xF0)
+ *s = Lo8(Lo16(*s));
}
} else {
Y_ASSERT(!SingleByteCodepage(enc));
@@ -290,8 +290,8 @@ void DoDecodeUnknownPlane(TxChar* str, TxChar*& ee, const ECharset enc) {
size_t read = 0;
size_t written = 0;
for (; s < e; ++s) {
- if (Hi8(Lo16(*s)) == 0xF0) {
- buf.push_back(Lo8(Lo16(*s)));
+ if (Hi8(Lo16(*s)) == 0xF0) {
+ buf.push_back(Lo8(Lo16(*s)));
} else {
if (!buf.empty()) {
if (RecodeToUnicode(enc, buf.data(), d, buf.size(), e - d, read, written) == RECODE_OK) {
diff --git a/library/cpp/charset/ut/ya.make b/library/cpp/charset/ut/ya.make
index 1f9934c712..008f323970 100644
--- a/library/cpp/charset/ut/ya.make
+++ b/library/cpp/charset/ut/ya.make
@@ -3,7 +3,7 @@ UNITTEST_FOR(library/cpp/charset)
OWNER(alzobnin)
SRCS(
- ci_string_ut.cpp
+ ci_string_ut.cpp
codepage_ut.cpp
iconv_ut.cpp
wide_ut.cpp
diff --git a/library/cpp/charset/wide_ut.cpp b/library/cpp/charset/wide_ut.cpp
index 78947d51ba..6097773b4b 100644
--- a/library/cpp/charset/wide_ut.cpp
+++ b/library/cpp/charset/wide_ut.cpp
@@ -261,10 +261,10 @@ void TConversionTest::TestRecodeIntoString() {
TUtf16String copy = sUnicode; // increase ref-counter
wres = NDetail::Recode<char>(UTF8Text, sUnicode, CODES_UTF8);
UNIT_ASSERT(sUnicode == UnicodeText); // same content
-#ifndef TSTRING_IS_STD_STRING
+#ifndef TSTRING_IS_STD_STRING
UNIT_ASSERT(sUnicode.data() != wdata); // re-allocated (shared buffer supplied)
UNIT_ASSERT(sUnicode.data() == wres.data()); // same buffer
-#endif
+#endif
UNIT_ASSERT(sUnicode.size() == wres.size()); // same content
}
@@ -372,7 +372,7 @@ void TConversionTest::TestRecode() {
UNIT_ASSERT_VALUES_EQUAL(size_t(1), written);
UNIT_ASSERT_VALUES_EQUAL(rch2, rch);
- if (hash.contains(rch)) { // there are some stupid encodings with duplicate characters
+ if (hash.contains(rch)) { // there are some stupid encodings with duplicate characters
continue;
} else {
hash.insert(rch);