aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/charset
diff options
context:
space:
mode:
authorleo <leo@yandex-team.ru>2022-02-10 16:46:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:40 +0300
commit980edcd3304699edf9d4e4d6a656e585028e2a72 (patch)
tree139f47f3911484ae9af0eb347b1a88bd6c4bb35f /library/cpp/charset
parentb036a557f285146e5e35d4213e29a094ab907bcf (diff)
downloadydb-980edcd3304699edf9d4e4d6a656e585028e2a72.tar.gz
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/charset')
-rw-r--r--library/cpp/charset/codepage.cpp4
-rw-r--r--library/cpp/charset/codepage.h10
-rw-r--r--library/cpp/charset/codepage_ut.cpp4
-rw-r--r--library/cpp/charset/doccodes.h4
-rw-r--r--library/cpp/charset/recyr.hh10
-rw-r--r--library/cpp/charset/ya.make4
6 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/charset/codepage.cpp b/library/cpp/charset/codepage.cpp
index 0431bef31b..b7205e903c 100644
--- a/library/cpp/charset/codepage.cpp
+++ b/library/cpp/charset/codepage.cpp
@@ -132,7 +132,7 @@ private:
TData Data;
TMemoryPool Pool;
-
+
private:
inline void AddNameWithCheck(const TString& name, ECharset code) {
if (Data.find(name.c_str()) == Data.end()) {
@@ -189,7 +189,7 @@ public:
return CODES_UNKNOWN;
return it->second;
- }
+ }
};
ECharset CharsetByName(TStringBuf name) {
diff --git a/library/cpp/charset/codepage.h b/library/cpp/charset/codepage.h
index 30a02a4610..2bad95ee4d 100644
--- a/library/cpp/charset/codepage.h
+++ b/library/cpp/charset/codepage.h
@@ -159,12 +159,12 @@ ECharset CharsetByName(TStringBuf name);
ECharset CharsetByNameOrDie(TStringBuf name);
inline ECharset CharsetByCodePage(const CodePage* CP) {
- return CP->CPEnum;
-}
+ return CP->CPEnum;
+}
inline const char* NameByCharset(ECharset e) {
return ::NCodepagePrivate::TCodepagesMap::Instance().NameByCharset(e);
-}
+}
inline const char* NameByCharsetSafe(ECharset e) {
if (CODES_UNKNOWN < e && e < CODES_MAX)
@@ -174,8 +174,8 @@ inline const char* NameByCharsetSafe(ECharset e) {
}
inline const char* NameByCodePage(const CodePage* CP) {
- return CP->Names[0];
-}
+ return CP->Names[0];
+}
inline const CodePage* CodePageByName(const char* name) {
ECharset code = CharsetByName(name);
diff --git a/library/cpp/charset/codepage_ut.cpp b/library/cpp/charset/codepage_ut.cpp
index c3ac3ac478..8d7fb4980a 100644
--- a/library/cpp/charset/codepage_ut.cpp
+++ b/library/cpp/charset/codepage_ut.cpp
@@ -9,8 +9,8 @@
#if defined(_MSC_VER)
#pragma warning(disable : 4309) /*truncation of constant value*/
-#endif
-
+#endif
+
namespace {
const char yandexUpperCase[] =
"\x81\x82\x83\x84\x85\x86\x87"
diff --git a/library/cpp/charset/doccodes.h b/library/cpp/charset/doccodes.h
index 75c87adf9e..ee5108b658 100644
--- a/library/cpp/charset/doccodes.h
+++ b/library/cpp/charset/doccodes.h
@@ -12,11 +12,11 @@ enum ECharset {
CODES_RESERVED_3, // reserved code: use it for new encodings before adding them to the end of the list
CODES_WIN_EAST, // [ 7] WINDOWS_1250 WIN PL
CODES_ISO_EAST, // [ 8] ISO_8859_2 ISO PL
- // our superset of subset of windows-1251
+ // our superset of subset of windows-1251
CODES_YANDEX, // [ 9] YANDEX
CODES_UTF_16BE, // [10] UTF_16BE
CODES_UTF_16LE, // [11] UTF_16LE
- // missing standard codepages
+ // missing standard codepages
CODES_IBM855, // [12] IBM_855
CODES_UTF8, // [13] UTF8
CODES_UNKNOWNPLANE, // [14] Unrecognized characters are mapped into the PUA: U+F000..U+F0FF
diff --git a/library/cpp/charset/recyr.hh b/library/cpp/charset/recyr.hh
index 5ec8734bcf..594451e164 100644
--- a/library/cpp/charset/recyr.hh
+++ b/library/cpp/charset/recyr.hh
@@ -1,6 +1,6 @@
#pragma once
-#include <cstdlib>
+#include <cstdlib>
#include <util/charset/recode_result.h>
#include <util/generic/ptr.h>
@@ -49,7 +49,7 @@ inline RECODE_RESULT RecodeFromUnicode(ECharset to, const TCharType* in, char* o
inline RECODE_RESULT RecodeFromUnicode(ECharset theEncoding, const wchar16* chars, size_t length,
char* bytes, size_t size, size_t* read = nullptr, size_t* written = nullptr) {
size_t w = 0, r = 0;
- RECODE_RESULT rc = ::RecodeFromUnicode(theEncoding, chars, bytes, length, size, r, w);
+ RECODE_RESULT rc = ::RecodeFromUnicode(theEncoding, chars, bytes, length, size, r, w);
if (read)
*read = r;
if (written)
@@ -93,8 +93,8 @@ inline RECODE_RESULT Recode(ECharset from, ECharset to, const char* in, char* ou
res = RecodeFromUnicode(to, wide.Get(), out, wideWritten, outSize, wideRead, outWritten);
return res;
-}
-
+}
+
inline RECODE_RESULT Recode(ECharset from, ECharset to, const char* in, char* out, size_t inSize, size_t outSize) {
size_t inRead = 0;
size_t outWritten = 0;
@@ -156,7 +156,7 @@ inline TString RecodeToHTMLEntities(ECharset from, const TString& in) {
res = NCodepagePrivate::_recodeToHTMLEntities(from, in.c_str(), out.begin(), in.length(), out.length(), inRead, outWritten);
}
if (res != RECODE_OK) {
- ythrow yexception() << "Recode to HTML entities failed";
+ ythrow yexception() << "Recode to HTML entities failed";
}
out.resize(outWritten - 1);
diff --git a/library/cpp/charset/ya.make b/library/cpp/charset/ya.make
index 7565566bf0..fff2d160ed 100644
--- a/library/cpp/charset/ya.make
+++ b/library/cpp/charset/ya.make
@@ -9,8 +9,8 @@ SRCS(
cp_encrec.cpp
doccodes.cpp
iconv.cpp
- recyr.hh
- recyr_int.hh
+ recyr.hh
+ recyr_int.hh
ci_string.cpp
wide.cpp
)