diff options
author | yoda <yoda@yandex-team.ru> | 2022-02-10 16:50:00 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:00 +0300 |
commit | 86ac2045bfe9733d3396425a6ecade74c11ac489 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic | |
parent | ddd64736134d6d92b80a934c8cf8228944ee4236 (diff) | |
download | ydb-86ac2045bfe9733d3396425a6ecade74c11ac489.tar.gz |
Restoring authorship annotation for <yoda@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic')
-rw-r--r-- | util/generic/ptr.h | 32 | ||||
-rw-r--r-- | util/generic/string_ut.h | 2 |
2 files changed, 17 insertions, 17 deletions
diff --git a/util/generic/ptr.h b/util/generic/ptr.h index 14f6893d9b..19db0e3ec5 100644 --- a/util/generic/ptr.h +++ b/util/generic/ptr.h @@ -610,7 +610,7 @@ struct THash<TIntrusivePtr<T, Ops>>: THash<const T*> { } }; -// Behaves like TIntrusivePtr but returns const T* to prevent user from accidentally modifying the referenced object. +// Behaves like TIntrusivePtr but returns const T* to prevent user from accidentally modifying the referenced object. template <class T, class Ops> class TIntrusiveConstPtr: public TPointerBase<TIntrusiveConstPtr<T, Ops>, const T> { public: @@ -620,17 +620,17 @@ public: Ops(); Ref(); } - + inline ~TIntrusiveConstPtr() { UnRef(); } - + inline TIntrusiveConstPtr(const TIntrusiveConstPtr& p) noexcept : T_(p.T_) { Ref(); } - + inline TIntrusiveConstPtr(TIntrusiveConstPtr&& p) noexcept : T_(nullptr) { @@ -642,7 +642,7 @@ public: { p.T_ = nullptr; } - + template <class U, class = TGuardConversion<T, U>> inline TIntrusiveConstPtr(const TIntrusiveConstPtr<U>& p) noexcept : T_(p.T_) @@ -659,10 +659,10 @@ public: inline TIntrusiveConstPtr& operator=(TIntrusiveConstPtr p) noexcept { p.Swap(*this); - + return *this; } - + // Effectively replace both: // Reset(const TIntrusiveConstPtr&) // Reset(TIntrusiveConstPtr&&) @@ -677,15 +677,15 @@ public: inline const T* Get() const noexcept { return T_; } - + inline void Swap(TIntrusiveConstPtr& r) noexcept { DoSwap(T_, r.T_); } - + inline void Drop() noexcept { TIntrusiveConstPtr(nullptr).Swap(*this); } - + inline long RefCount() const noexcept { return T_ ? Ops::RefCount(T_) : 0; } @@ -700,22 +700,22 @@ private: inline void Ref() noexcept { if (T_ != nullptr) { Ops::Ref(T_); - } + } } - + inline void UnRef() noexcept { if (T_ != nullptr) { Ops::UnRef(T_); - } + } } - + private: T* T_; template <class U, class O> friend class TIntrusiveConstPtr; -}; - +}; + template <class T, class Ops> struct THash<TIntrusiveConstPtr<T, Ops>>: THash<const T*> { using THash<const T*>::operator(); diff --git a/util/generic/string_ut.h b/util/generic/string_ut.h index 4eaa02c6c6..44bb10bdeb 100644 --- a/util/generic/string_ut.h +++ b/util/generic/string_ut.h @@ -901,7 +901,7 @@ public: } catch (...) { Cerr << hash_val << Endl; throw; - }*/ + }*/ s2.assign(Data._0123456(), 2, 2); UNIT_ASSERT(s2 == Data._23()); |