summaryrefslogtreecommitdiffstats
path: root/library/cpp/yson_pull/detail
diff options
context:
space:
mode:
authorVlad Yaroslavlev <[email protected]>2022-02-10 16:46:25 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:46:25 +0300
commit344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/yson_pull/detail
parent706b83ed7de5a473436620367af31fc0ceecde07 (diff)
Restoring authorship annotation for Vlad Yaroslavlev <[email protected]>. Commit 2 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 738e8ec32f4..1ea150e69aa 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 57bc2697ae1..683fd1bf361 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 abe495aa478..791cd5a3f52 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 525304ec8ee..572bdb3d18b 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 4c5ca4db827..d4810f33538 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 655d450b8e7..0e023963581 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 4b3238ec336..b24b9942927 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;