aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yson
diff options
context:
space:
mode:
authortobo <tobo@yandex-team.ru>2022-02-10 16:47:27 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:27 +0300
commit55a7f90e4cd31e9481cace8ee5dfd682c27e810e (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/yson
parent7fe839092527589b38f014d854c51565b3c1adfa (diff)
downloadydb-55a7f90e4cd31e9481cace8ee5dfd682c27e810e.tar.gz
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yson')
-rw-r--r--library/cpp/yson/detail.h12
-rw-r--r--library/cpp/yson/node/node.cpp14
-rw-r--r--library/cpp/yson/node/node.h6
-rw-r--r--library/cpp/yson/writer.cpp20
4 files changed, 26 insertions, 26 deletions
diff --git a/library/cpp/yson/detail.h b/library/cpp/yson/detail.h
index a4c3fa769b..27f5e8ffff 100644
--- a/library/cpp/yson/detail.h
+++ b/library/cpp/yson/detail.h
@@ -425,10 +425,10 @@ namespace NYson {
template <bool AllowFinish>
double ReadNanOrInf() {
- static const TStringBuf nanString = "nan";
- static const TStringBuf infString = "inf";
- static const TStringBuf plusInfString = "+inf";
- static const TStringBuf minusInfString = "-inf";
+ static const TStringBuf nanString = "nan";
+ static const TStringBuf infString = "inf";
+ static const TStringBuf plusInfString = "+inf";
+ static const TStringBuf minusInfString = "-inf";
TStringBuf expectedString;
double expectedValue;
@@ -560,8 +560,8 @@ namespace NYson {
bool ReadBoolean() {
Buffer_.clear();
- static TStringBuf trueString = "true";
- static TStringBuf falseString = "false";
+ static TStringBuf trueString = "true";
+ static TStringBuf falseString = "false";
auto throwIncorrectBoolean = [&]() {
ythrow TYsonException() << "Incorrect boolean string " << TString(Buffer_.data(), Buffer_.size());
diff --git a/library/cpp/yson/node/node.cpp b/library/cpp/yson/node/node.cpp
index 262708a2d0..b39e070718 100644
--- a/library/cpp/yson/node/node.cpp
+++ b/library/cpp/yson/node/node.cpp
@@ -99,18 +99,18 @@ TNode::TNode(const char* s)
: Value_(TString(s))
{ }
-TNode::TNode(TStringBuf s)
+TNode::TNode(TStringBuf s)
: Value_(TString(s))
{ }
-TNode::TNode(std::string_view s)
+TNode::TNode(std::string_view s)
: Value_(TString(s))
-{ }
-
-TNode::TNode(const std::string& s)
+{ }
+
+TNode::TNode(const std::string& s)
: Value_(TString(s))
-{ }
-
+{ }
+
TNode::TNode(TString s)
: Value_(std::move(s))
{ }
diff --git a/library/cpp/yson/node/node.h b/library/cpp/yson/node/node.h
index 772100bd36..5f90f95df0 100644
--- a/library/cpp/yson/node/node.h
+++ b/library/cpp/yson/node/node.h
@@ -73,9 +73,9 @@ public:
TNode();
TNode(const char* s);
- TNode(TStringBuf s);
- explicit TNode(std::string_view s);
- explicit TNode(const std::string& s);
+ TNode(TStringBuf s);
+ explicit TNode(std::string_view s);
+ explicit TNode(const std::string& s);
TNode(TString s);
TNode(int i);
diff --git a/library/cpp/yson/writer.cpp b/library/cpp/yson/writer.cpp
index 43402eb506..054459f9f5 100644
--- a/library/cpp/yson/writer.cpp
+++ b/library/cpp/yson/writer.cpp
@@ -15,7 +15,7 @@ namespace NYson {
// Copied from <util/string/escape.cpp>
namespace {
- inline char HexDigit(char value) {
+ inline char HexDigit(char value) {
Y_ASSERT(value < 16);
if (value < 10)
return '0' + value;
@@ -23,26 +23,26 @@ namespace NYson {
return 'A' + value - 10;
}
- inline char OctDigit(char value) {
+ inline char OctDigit(char value) {
Y_ASSERT(value < 8);
return '0' + value;
}
- inline bool IsPrintable(char c) {
+ inline bool IsPrintable(char c) {
return c >= 32 && c <= 126;
}
- inline bool IsHexDigit(char c) {
+ inline bool IsHexDigit(char c) {
return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
}
- inline bool IsOctDigit(char c) {
+ inline bool IsOctDigit(char c) {
return c >= '0' && c <= '7';
}
- const size_t ESCAPE_C_BUFFER_SIZE = 4;
+ const size_t ESCAPE_C_BUFFER_SIZE = 4;
- inline size_t EscapeC(unsigned char c, char next, char r[ESCAPE_C_BUFFER_SIZE]) {
+ inline size_t EscapeC(unsigned char c, char next, char r[ESCAPE_C_BUFFER_SIZE]) {
// (1) Printable characters go as-is, except backslash and double quote.
// (2) Characters \r, \n, \t and \0 ... \7 replaced by their simple escape characters (if possible).
// (3) Otherwise, character is encoded using hexadecimal escape sequence (if possible), or octal.
@@ -114,9 +114,9 @@ namespace NYson {
return ::ToString(value);
}
- static const TStringBuf nanLiteral = "%nan";
- static const TStringBuf infLiteral = "%inf";
- static const TStringBuf negativeInfLiteral = "%-inf";
+ static const TStringBuf nanLiteral = "%nan";
+ static const TStringBuf infLiteral = "%inf";
+ static const TStringBuf negativeInfLiteral = "%-inf";
TStringBuf str;
if (std::isnan(value)) {