diff options
author | nae202 <nae202@yandex-team.com> | 2024-11-20 12:52:01 +0300 |
---|---|---|
committer | nae202 <nae202@yandex-team.com> | 2024-11-20 13:14:09 +0300 |
commit | 0b9d91e900b52bccd6eabd033acbb57c4ee173fc (patch) | |
tree | 6839ed69fbda4d5214eb418acc4554924bc64160 /util/generic/ptr.h | |
parent | 878e26057d11cce46b7bc3a6c838209d4686e28b (diff) | |
download | ydb-0b9d91e900b52bccd6eabd033acbb57c4ee173fc.tar.gz |
Part of PR. Style
Часть большого ПР REVIEW:7264088
commit_hash:0f5b03fbbed0ac30f734943309e3ef5cd4d7a30e
Diffstat (limited to 'util/generic/ptr.h')
-rw-r--r-- | util/generic/ptr.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/util/generic/ptr.h b/util/generic/ptr.h index 703e61e68e..7057949bc4 100644 --- a/util/generic/ptr.h +++ b/util/generic/ptr.h @@ -1035,8 +1035,9 @@ class TCopyClone { public: template <class T> static inline T* Copy(T* t) { - if (t) + if (t) { return t->Clone(); + } return nullptr; } }; @@ -1045,8 +1046,9 @@ class TCopyNew { public: template <class T> static inline T* Copy(T* t) { - if (t) + if (t) { return new T(*t); + } return nullptr; } }; @@ -1115,8 +1117,9 @@ public: #endif private: inline void DoDestroy() noexcept { - if (T_) + if (T_) { D::Destroy(T_); + } } private: |