aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yson_pull/detail
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:23 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:23 +0300
commit706b83ed7de5a473436620367af31fc0ceecde07 (patch)
tree103305d30dec77e8f6367753367f59b3cd68f9f1 /library/cpp/yson_pull/detail
parent918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff)
downloadydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yson_pull/detail')
-rw-r--r--library/cpp/yson_pull/detail/cescape.h22
-rw-r--r--library/cpp/yson_pull/detail/format_string.h6
-rw-r--r--library/cpp/yson_pull/detail/input/stream.h4
-rw-r--r--library/cpp/yson_pull/detail/lexer_base.h2
-rw-r--r--library/cpp/yson_pull/detail/output/stream.h4
-rw-r--r--library/cpp/yson_pull/detail/reader.h2
-rw-r--r--library/cpp/yson_pull/detail/writer.h2
7 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/yson_pull/detail/cescape.h b/library/cpp/yson_pull/detail/cescape.h
index 1ea150e69a..738e8ec32f 100644
--- a/library/cpp/yson_pull/detail/cescape.h
+++ b/library/cpp/yson_pull/detail/cescape.h
@@ -6,7 +6,7 @@
#include "macros.h"
#include <util/generic/strbuf.h>
-#include <util/generic/string.h>
+#include <util/generic/string.h>
#include <util/generic/vector.h>
/* REFERENCES FOR ESCAPE SEQUENCE INTERPRETATION:
@@ -38,7 +38,7 @@
namespace NYsonPull {
namespace NDetail {
namespace NCEscape {
- inline void encode(TString& dest, TStringBuf data) {
+ inline void encode(TString& dest, TStringBuf data) {
NImpl::escape_impl(
reinterpret_cast<const ui8*>(data.data()),
data.size(),
@@ -78,14 +78,14 @@ namespace NYsonPull {
}
}
- inline TString encode(TStringBuf data) {
- TString result;
+ inline TString encode(TStringBuf data) {
+ TString result;
result.reserve(data.size());
encode(result, data);
return result;
}
- inline void decode(TString& dest, TStringBuf data) {
+ inline void decode(TString& dest, TStringBuf data) {
NImpl::unescape_impl(
reinterpret_cast<const ui8*>(data.begin()),
reinterpret_cast<const ui8*>(data.end()),
@@ -97,7 +97,7 @@ namespace NYsonPull {
});
}
- inline void decode_inplace(TVector<ui8>& data) {
+ inline void decode_inplace(TVector<ui8>& data) {
auto* out = static_cast<ui8*>(
::memchr(data.data(), '\\', data.size()));
if (out == nullptr) {
@@ -116,16 +116,16 @@ namespace NYsonPull {
data.resize(out - &data[0]);
}
- inline TString decode(TStringBuf data) {
- TString result;
+ inline TString decode(TStringBuf data) {
+ TString result;
result.reserve(data.size());
decode(result, data);
return result;
}
ATTRIBUTE(noinline, cold)
- inline TString quote(TStringBuf str) {
- TString result;
+ inline TString quote(TStringBuf str) {
+ TString result;
result.reserve(str.size() + 16);
result += '"';
encode(result, str);
@@ -134,7 +134,7 @@ namespace NYsonPull {
}
ATTRIBUTE(noinline, cold)
- inline TString quote(ui8 ch) {
+ inline TString quote(ui8 ch) {
char c = ch;
return quote(TStringBuf(&c, 1));
}
diff --git a/library/cpp/yson_pull/detail/format_string.h b/library/cpp/yson_pull/detail/format_string.h
index 683fd1bf36..57bc2697ae 100644
--- a/library/cpp/yson_pull/detail/format_string.h
+++ b/library/cpp/yson_pull/detail/format_string.h
@@ -1,7 +1,7 @@
#pragma once
#include <util/generic/strbuf.h>
-#include <util/generic/string.h>
+#include <util/generic/string.h>
#include <util/string/builder.h>
namespace NYsonPull {
@@ -17,10 +17,10 @@ namespace NYsonPull {
}
template <typename... Args>
- TString format_string(Args&&... args) {
+ TString format_string(Args&&... args) {
TStringBuilder builder;
NImpl::apply_args(builder, std::forward<Args>(args)...);
- return TString(std::move(builder));
+ return TString(std::move(builder));
}
}
}
diff --git a/library/cpp/yson_pull/detail/input/stream.h b/library/cpp/yson_pull/detail/input/stream.h
index 791cd5a3f5..abe495aa47 100644
--- a/library/cpp/yson_pull/detail/input/stream.h
+++ b/library/cpp/yson_pull/detail/input/stream.h
@@ -57,10 +57,10 @@ namespace NYsonPull {
}
};
- class TFHandle: public TOwned<TFileInput> {
+ class TFHandle: public TOwned<TFileInput> {
public:
TFHandle(int fd, size_t buffer_size)
- : TOwned<TFileInput>(Duplicate(fd), buffer_size)
+ : TOwned<TFileInput>(Duplicate(fd), buffer_size)
{
}
};
diff --git a/library/cpp/yson_pull/detail/lexer_base.h b/library/cpp/yson_pull/detail/lexer_base.h
index 572bdb3d18..525304ec8e 100644
--- a/library/cpp/yson_pull/detail/lexer_base.h
+++ b/library/cpp/yson_pull/detail/lexer_base.h
@@ -19,7 +19,7 @@ namespace NYsonPull {
using Base = byte_reader<
stream_counter<EnableLinePositionInfo>>;
- TVector<ui8> token_buffer_;
+ TVector<ui8> token_buffer_;
TMaybe<size_t> memory_limit_;
public:
diff --git a/library/cpp/yson_pull/detail/output/stream.h b/library/cpp/yson_pull/detail/output/stream.h
index d4810f3353..4c5ca4db82 100644
--- a/library/cpp/yson_pull/detail/output/stream.h
+++ b/library/cpp/yson_pull/detail/output/stream.h
@@ -44,10 +44,10 @@ namespace NYsonPull {
}
};
- class TFHandle: public TOwned<TUnbufferedFileOutput> {
+ class TFHandle: public TOwned<TUnbufferedFileOutput> {
public:
TFHandle(int fd, size_t buffer_size)
- : TOwned<TUnbufferedFileOutput>(buffer_size, Duplicate(fd))
+ : TOwned<TUnbufferedFileOutput>(buffer_size, Duplicate(fd))
{
}
};
diff --git a/library/cpp/yson_pull/detail/reader.h b/library/cpp/yson_pull/detail/reader.h
index 0e02396358..655d450b8e 100644
--- a/library/cpp/yson_pull/detail/reader.h
+++ b/library/cpp/yson_pull/detail/reader.h
@@ -188,7 +188,7 @@ namespace NYsonPull {
lexer_base<EnableLinePositionInfo> lexer_;
state state_;
TEvent event_;
- TVector<EEventType> stack_;
+ TVector<EEventType> stack_;
EStreamType mode_;
public:
diff --git a/library/cpp/yson_pull/detail/writer.h b/library/cpp/yson_pull/detail/writer.h
index b24b994292..4b3238ec33 100644
--- a/library/cpp/yson_pull/detail/writer.h
+++ b/library/cpp/yson_pull/detail/writer.h
@@ -32,7 +32,7 @@ namespace NYsonPull {
};
byte_writer<stream_counter<false>> stream_;
- TVector<EEventType> stack_;
+ TVector<EEventType> stack_;
bool need_item_separator_ = false;
EStreamType mode_ = EStreamType::ListFragment;
state state_ = state::before_begin;