aboutsummaryrefslogtreecommitdiffstats
path: root/util/memory
diff options
context:
space:
mode:
authortender-bum <tender-bum@yandex-team.ru>2022-02-10 16:50:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:01 +0300
commit4aef354b224559d2b031487a10d4f5cc6e82e95a (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/memory
parentc78b06a63de7beec995c1007bc5332bdf3d75b69 (diff)
downloadydb-4aef354b224559d2b031487a10d4f5cc6e82e95a.tar.gz
Restoring authorship annotation for <tender-bum@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/memory')
-rw-r--r--util/memory/blob.cpp32
-rw-r--r--util/memory/blob.h16
2 files changed, 24 insertions, 24 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));
+}
diff --git a/util/memory/blob.h b/util/memory/blob.h
index 73de03bb53..20c02a68df 100644
--- a/util/memory/blob.h
+++ b/util/memory/blob.h
@@ -294,18 +294,18 @@ public:
/// @details The input object becomes empty.
static TBlob FromBuffer(TBuffer& in);
- /// Creates a blob from TString with a single-threaded (non atomic) refcounter.
+ /// Creates a blob from TString with a single-threaded (non atomic) refcounter.
static TBlob FromStringSingleThreaded(const TString& s);
- /// Creates a blob from TString with a single-threaded (non atomic) refcounter. Doesn't copy its content.
- static TBlob FromStringSingleThreaded(TString&& s);
-
- /// Creates a blob from TString with a multi-threaded (atomic) refcounter.
+ /// Creates a blob from TString with a single-threaded (non atomic) refcounter. Doesn't copy its content.
+ static TBlob FromStringSingleThreaded(TString&& s);
+
+ /// Creates a blob from TString with a multi-threaded (atomic) refcounter.
static TBlob FromString(const TString& s);
- /// Creates a blob from TString with a multi-threaded (atomic) refcounter. Doesn't copy its content.
- static TBlob FromString(TString&& s);
-
+ /// Creates a blob from TString with a multi-threaded (atomic) refcounter. Doesn't copy its content.
+ static TBlob FromString(TString&& s);
+
private:
inline void Ref() noexcept {
if (S_.Base) {