aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/ptr.h
diff options
context:
space:
mode:
authorMaxim Yurchuk <maxim-yurchuk@ydb.tech>2024-11-20 17:37:57 +0000
committerGitHub <noreply@github.com>2024-11-20 17:37:57 +0000
commitf76323e9b295c15751e51e3443aa47a36bee8023 (patch)
tree4113c8cad473a33e0f746966e0cf087252fa1d7a /util/generic/ptr.h
parent753ecb8d410a4cb459c26f3a0082fb2d1724fe63 (diff)
parenta7b9a6afea2a9d7a7bfac4c5eb4c1a8e60adb9e6 (diff)
downloadydb-f76323e9b295c15751e51e3443aa47a36bee8023.tar.gz
Merge pull request #11788 from ydb-platform/mergelibs-241120-1113
Library import 241120-1113
Diffstat (limited to 'util/generic/ptr.h')
-rw-r--r--util/generic/ptr.h9
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: