From 4ea50ca32373432942a67c5d898db2dc9688dd7c Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 29 Jul 2018 18:20:34 +0000 Subject: [PATCH] Core: One: clone instead of DeepCopyNew git-svn-id: svn://ultimatepp.org/upp/trunk@12117 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Other.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uppsrc/Core/Other.h b/uppsrc/Core/Other.h index 26f89cf4a..da2edc04a 100644 --- a/uppsrc/Core/Other.h +++ b/uppsrc/Core/Other.h @@ -66,7 +66,7 @@ public: One(T *newt) { ptr = newt; } template One(One&& p) { Pick(pick(p)); } - One(const One& p, int) { ptr = p.IsEmpty() ? NULL : DeepCopyNew(*p); } + One(const One& p, int) { ptr = p.IsEmpty() ? NULL : new T(clone(*p)); } One(const One& p) = delete; void operator=(const One& p) = delete; ~One() { Free(); }