diff options
author | tender-bum <tender-bum@yandex-team.ru> | 2022-02-10 16:50:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:01 +0300 |
commit | 4aef354b224559d2b031487a10d4f5cc6e82e95a (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/memory/blob.cpp | |
parent | c78b06a63de7beec995c1007bc5332bdf3d75b69 (diff) | |
download | ydb-4aef354b224559d2b031487a10d4f5cc6e82e95a.tar.gz |
Restoring authorship annotation for <tender-bum@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/memory/blob.cpp')
-rw-r--r-- | util/memory/blob.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/util/memory/blob.cpp b/util/memory/blob.cpp index d805cffa1b..91da5cadca 100644 --- a/util/memory/blob.cpp +++ b/util/memory/blob.cpp @@ -77,11 +77,11 @@ public: { } - TStringBlobBase(TString&& s) noexcept - : S_(std::move(s)) - { - } - + TStringBlobBase(TString&& s) noexcept + : S_(std::move(s)) + { + } + ~TStringBlobBase() override = default; void Ref() noexcept override { @@ -390,10 +390,10 @@ TBlob TBlob::FromBuffer(TBuffer& in) { return ConstructFromBuffer<TAtomicCounter>(in); } -template <class TCounter, class S> -TBlob ConstructFromString(S&& s) { +template <class TCounter, class S> +TBlob ConstructFromString(S&& s) { using TBase = TStringBlobBase<TCounter>; - auto base = MakeHolder<TBase>(std::forward<S>(s)); + auto base = MakeHolder<TBase>(std::forward<S>(s)); TBlob ret(base->String().data(), base->String().size(), base.Get()); Y_UNUSED(base.Release()); @@ -405,14 +405,14 @@ TBlob TBlob::FromStringSingleThreaded(const TString& s) { return ConstructFromString<TSimpleCounter>(s); } -TBlob TBlob::FromStringSingleThreaded(TString&& s) { - return ConstructFromString<TSimpleCounter>(std::move(s)); -} - +TBlob TBlob::FromStringSingleThreaded(TString&& s) { + return ConstructFromString<TSimpleCounter>(std::move(s)); +} + TBlob TBlob::FromString(const TString& s) { return ConstructFromString<TAtomicCounter>(s); } - -TBlob TBlob::FromString(TString&& s) { - return ConstructFromString<TAtomicCounter>(std::move(s)); -} + +TBlob TBlob::FromString(TString&& s) { + return ConstructFromString<TAtomicCounter>(std::move(s)); +} |