mirror of https://github.com/AxioDL/metaforce.git
use of std::default_delete for template-safe deletion
This commit is contained in:
parent
9008ab83c3
commit
8c659f9fb8
|
@ -29,7 +29,7 @@ public:
|
|||
return std::unique_ptr<TObjOwnerDerivedFromIObj<T>>
|
||||
(new TObjOwnerDerivedFromIObj<T>(obj.release()));
|
||||
}
|
||||
~TObjOwnerDerivedFromIObj() {delete static_cast<T*>(m_objPtr);}
|
||||
~TObjOwnerDerivedFromIObj() {std::default_delete<T>()(static_cast<T*>(m_objPtr));}
|
||||
T* GetObj() {return static_cast<T*>(m_objPtr);}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue