diff options
author | renadeen <renadeen@yandex-team.ru> | 2022-02-10 16:50:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:48 +0300 |
commit | 8e8d08ad14d2bf27a663f9a5ba0a058239942b62 (patch) | |
tree | 8d66190950a9076cee8b7d40d0bdb149e5afbb9b /library/cpp/yt/memory | |
parent | e55e35630443fbd1ab23fc2734140a9e06509073 (diff) | |
download | ydb-8e8d08ad14d2bf27a663f9a5ba0a058239942b62.tar.gz |
Restoring authorship annotation for <renadeen@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yt/memory')
-rw-r--r-- | library/cpp/yt/memory/new-inl.h | 20 | ||||
-rw-r--r-- | library/cpp/yt/memory/ref_counted-inl.h | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/yt/memory/new-inl.h b/library/cpp/yt/memory/new-inl.h index 0a84818516..37870ea79d 100644 --- a/library/cpp/yt/memory/new-inl.h +++ b/library/cpp/yt/memory/new-inl.h @@ -1,7 +1,7 @@ #ifndef NEW_INL_H_ #error "Direct inclusion of this file is not allowed, include new.h" -// For the sake of sane code completion. -#include "new.h" +// For the sake of sane code completion. +#include "new.h" #endif #include <library/cpp/ytalloc/api/ytalloc.h> @@ -108,20 +108,20 @@ Y_FORCE_INLINE void CustomInitialize(Args... args) { Y_UNUSED(args...); } - -template <class T> -Y_FORCE_INLINE auto CustomInitialize(T* ptr) -> decltype(&T::InitializeRefCounted, void()) -{ - ptr->InitializeRefCounted(); -} - + +template <class T> +Y_FORCE_INLINE auto CustomInitialize(T* ptr) -> decltype(&T::InitializeRefCounted, void()) +{ + ptr->InitializeRefCounted(); +} + template <class T, class... As> Y_FORCE_INLINE T* NewEpilogue(void* ptr, As&& ... args) { try { auto* instance = static_cast<T*>(ptr); new (instance) T(std::forward<As>(args)...); - CustomInitialize(instance); + CustomInitialize(instance); return instance; } catch (const std::exception& ex) { // Do not forget to free the memory. diff --git a/library/cpp/yt/memory/ref_counted-inl.h b/library/cpp/yt/memory/ref_counted-inl.h index e6d64fec18..4ad706d778 100644 --- a/library/cpp/yt/memory/ref_counted-inl.h +++ b/library/cpp/yt/memory/ref_counted-inl.h @@ -1,7 +1,7 @@ #ifndef REF_COUNTED_INL_H_ #error "Direct inclusion of this file is not allowed, include ref_counted.h" -// For the sake of sane code completion. -#include "ref_counted.h" +// For the sake of sane code completion. +#include "ref_counted.h" #endif namespace NYT { |