diff options
Diffstat (limited to 'xfa/fde/xml/cfde_xmlchardata.cpp')
-rw-r--r-- | xfa/fde/xml/cfde_xmlchardata.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xfa/fde/xml/cfde_xmlchardata.cpp b/xfa/fde/xml/cfde_xmlchardata.cpp index 2339307938..bb2991937b 100644 --- a/xfa/fde/xml/cfde_xmlchardata.cpp +++ b/xfa/fde/xml/cfde_xmlchardata.cpp @@ -6,8 +6,10 @@ #include "xfa/fde/xml/cfde_xmlchardata.h" +#include "third_party/base/ptr_util.h" + CFDE_XMLCharData::CFDE_XMLCharData(const CFX_WideString& wsCData) - : CFDE_XMLNode(), m_wsCharData(wsCData) {} + : CFDE_XMLText(wsCData) {} CFDE_XMLCharData::~CFDE_XMLCharData() {} @@ -15,7 +17,6 @@ FDE_XMLNODETYPE CFDE_XMLCharData::GetType() const { return FDE_XMLNODE_CharData; } -CFDE_XMLNode* CFDE_XMLCharData::Clone(bool bRecursive) { - CFDE_XMLCharData* pClone = new CFDE_XMLCharData(m_wsCharData); - return pClone; +std::unique_ptr<CFDE_XMLNode> CFDE_XMLCharData::Clone() { + return pdfium::MakeUnique<CFDE_XMLCharData>(GetText()); } |