summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_document.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_document.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp
index 48791262ea..73d3081a9f 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -887,8 +887,7 @@ CPDF_Font* CPDF_Document::AddFont(CFX_Font* pFont, int charset, bool bVert) {
CPDF_Dictionary* pBaseDict = NewIndirect<CPDF_Dictionary>();
pBaseDict->SetNewFor<CPDF_Name>("Type", "Font");
- std::unique_ptr<CFX_UnicodeEncoding> pEncoding(
- new CFX_UnicodeEncoding(pFont));
+ auto pEncoding = pdfium::MakeUnique<CFX_UnicodeEncoding>(pFont);
CPDF_Dictionary* pFontDict = pBaseDict;
if (!bCJK) {
auto pWidths = pdfium::MakeUnique<CPDF_Array>();