Index: core/fpdfapi/parser/cpdf_string.cpp |
diff --git a/core/fpdfapi/parser/cpdf_string.cpp b/core/fpdfapi/parser/cpdf_string.cpp |
index f4fa956280cc274942121707103a8a23dc3f1f27..2116c200fe880fc8baf0b3cf43171ec82e41c4fc 100644 |
--- a/core/fpdfapi/parser/cpdf_string.cpp |
+++ b/core/fpdfapi/parser/cpdf_string.cpp |
@@ -7,6 +7,7 @@ |
#include "core/fpdfapi/parser/cpdf_string.h" |
#include "core/fpdfapi/parser/fpdf_parser_decode.h" |
+#include "third_party/base/ptr_util.h" |
CPDF_String::CPDF_String() : m_bHex(false) {} |
@@ -23,8 +24,8 @@ CPDF_Object::Type CPDF_String::GetType() const { |
return STRING; |
} |
-CPDF_Object* CPDF_String::Clone() const { |
- return new CPDF_String(m_String, m_bHex); |
+std::unique_ptr<CPDF_Object> CPDF_String::Clone() const { |
+ return pdfium::MakeUnique<CPDF_String>(m_String, m_bHex); |
} |
CFX_ByteString CPDF_String::GetString() const { |