diff options
author | Alexey Bykov <alexei4203@yandex.ru> | 2022-02-10 16:47:16 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:16 +0300 |
commit | b50730a77e0c38f2fec0ad5d53fb2034d6470221 (patch) | |
tree | 9814fbd1c3effac9b8377c5d604b367b14e2db55 /util/generic/ptr.h | |
parent | 4cadece7a57ab767e762a0bea1995a596aefeb11 (diff) | |
download | ydb-b50730a77e0c38f2fec0ad5d53fb2034d6470221.tar.gz |
Restoring authorship annotation for Alexey Bykov <alexei4203@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/ptr.h')
-rw-r--r-- | util/generic/ptr.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/util/generic/ptr.h b/util/generic/ptr.h index 8c9e19e09e..19db0e3ec5 100644 --- a/util/generic/ptr.h +++ b/util/generic/ptr.h @@ -345,7 +345,7 @@ private: }; template <typename T, typename... Args> -[[nodiscard]] THolder<T> MakeHolder(Args&&... args) { +[[nodiscard]] THolder<T> MakeHolder(Args&&... args) { return THolder<T>(new T(std::forward<Args>(args)...)); } @@ -779,12 +779,12 @@ template <class T, class Ops> typename TSimpleIntrusiveOps<T, Ops>::TFunc TSimpleIntrusiveOps<T, Ops>::UnRef_ = nullptr; template <typename T, class Ops = TDefaultIntrusivePtrOps<T>, typename... Args> -[[nodiscard]] TIntrusivePtr<T, Ops> MakeIntrusive(Args&&... args) { +[[nodiscard]] TIntrusivePtr<T, Ops> MakeIntrusive(Args&&... args) { return new T{std::forward<Args>(args)...}; } template <typename T, class Ops = TDefaultIntrusivePtrOps<T>, typename... Args> -[[nodiscard]] TIntrusiveConstPtr<T, Ops> MakeIntrusiveConst(Args&&... args) { +[[nodiscard]] TIntrusiveConstPtr<T, Ops> MakeIntrusiveConst(Args&&... args) { return new T{std::forward<Args>(args)...}; } @@ -948,17 +948,17 @@ template <class T, class D = TDelete> using TSimpleSharedPtr = TSharedPtr<T, TSimpleCounter, D>; template <typename T, typename C, typename... Args> -[[nodiscard]] TSharedPtr<T, C> MakeShared(Args&&... args) { +[[nodiscard]] TSharedPtr<T, C> MakeShared(Args&&... args) { return new T{std::forward<Args>(args)...}; } template <typename T, typename... Args> -[[nodiscard]] inline TAtomicSharedPtr<T> MakeAtomicShared(Args&&... args) { +[[nodiscard]] inline TAtomicSharedPtr<T> MakeAtomicShared(Args&&... args) { return MakeShared<T, TAtomicCounter>(std::forward<Args>(args)...); } template <typename T, typename... Args> -[[nodiscard]] inline TSimpleSharedPtr<T> MakeSimpleShared(Args&&... args) { +[[nodiscard]] inline TSimpleSharedPtr<T> MakeSimpleShared(Args&&... args) { return MakeShared<T, TSimpleCounter>(std::forward<Args>(args)...); } |