diff options
author | Mikhail Borisov <borisov.mikhail@gmail.com> | 2022-02-10 16:45:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:39 +0300 |
commit | a6a92afe03e02795227d2641b49819b687f088f8 (patch) | |
tree | f6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /library/cpp/yt | |
parent | c6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff) | |
download | ydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz |
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yt')
-rw-r--r-- | library/cpp/yt/memory/ref.cpp | 12 | ||||
-rw-r--r-- | library/cpp/yt/yson_string/string.cpp | 24 | ||||
-rw-r--r-- | library/cpp/yt/yson_string/string.h | 4 |
3 files changed, 20 insertions, 20 deletions
diff --git a/library/cpp/yt/memory/ref.cpp b/library/cpp/yt/memory/ref.cpp index e8ff42e976..af17f2f184 100644 --- a/library/cpp/yt/memory/ref.cpp +++ b/library/cpp/yt/memory/ref.cpp @@ -57,11 +57,11 @@ public: #endif } - const TString& String() const - { - return String_; - } - + const TString& String() const + { + return String_; + } + private: const TString String_; #ifdef YT_ENABLE_REF_COUNTED_TRACKING @@ -190,7 +190,7 @@ TMutableRef TMutableRef::FromBlob(TBlob& blob) TSharedRef TSharedRef::FromString(TString str, TRefCountedTypeCookie tagCookie) { auto holder = New<TStringHolder>(std::move(str), tagCookie); - auto ref = TRef::FromString(holder->String()); + auto ref = TRef::FromString(holder->String()); return TSharedRef(ref, std::move(holder)); } diff --git a/library/cpp/yt/yson_string/string.cpp b/library/cpp/yt/yson_string/string.cpp index 99d45e8616..1322212650 100644 --- a/library/cpp/yt/yson_string/string.cpp +++ b/library/cpp/yt/yson_string/string.cpp @@ -101,25 +101,25 @@ TYsonString::TYsonString( : TYsonString(TYsonStringBuf(data, type)) { } -#ifdef TSTRING_IS_STD_STRING +#ifdef TSTRING_IS_STD_STRING TYsonString::TYsonString( - const TString& data, + const TString& data, EYsonType type) - : TYsonString(TYsonStringBuf(data, type)) -{ } -#else -TYsonString::TYsonString( - const TString& data, - EYsonType type) -{ - // NOTE: CoW TString implementation is assumed - // Moving the payload MUST NOT invalidate its internal pointers + : TYsonString(TYsonStringBuf(data, type)) +{ } +#else +TYsonString::TYsonString( + const TString& data, + EYsonType type) +{ + // NOTE: CoW TString implementation is assumed + // Moving the payload MUST NOT invalidate its internal pointers Payload_ = data; Begin_ = data.data(); Size_ = data.length(); Type_ = type; } -#endif +#endif TYsonString::TYsonString( const TSharedRef& data, diff --git a/library/cpp/yt/yson_string/string.h b/library/cpp/yt/yson_string/string.h index e13af37a6d..adf2138564 100644 --- a/library/cpp/yt/yson_string/string.h +++ b/library/cpp/yt/yson_string/string.h @@ -76,9 +76,9 @@ public: EYsonType type = EYsonType::Node); //! Constructs an instance from TString. - //! Zero-copy for CoW TString: retains the reference to TString in payload. + //! Zero-copy for CoW TString: retains the reference to TString in payload. explicit TYsonString( - const TString& data, + const TString& data, EYsonType type = EYsonType::Node); //! Constructs an instance from TSharedRef. |