mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-02 16:22:40 -06:00
Core: One: clone instead of DeepCopyNew
git-svn-id: svn://ultimatepp.org/upp/trunk@12117 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
6b713ecc4a
commit
4ea50ca323
1 changed files with 1 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ public:
|
|||
One(T *newt) { ptr = newt; }
|
||||
template <class TT>
|
||||
One(One<TT>&& p) { Pick(pick(p)); }
|
||||
One(const One<T>& p, int) { ptr = p.IsEmpty() ? NULL : DeepCopyNew(*p); }
|
||||
One(const One<T>& p, int) { ptr = p.IsEmpty() ? NULL : new T(clone(*p)); }
|
||||
One(const One<T>& p) = delete;
|
||||
void operator=(const One<T>& p) = delete;
|
||||
~One() { Free(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue