From 8a3aa459fc5284f51bcd7e98e95bf6214f47bb67 Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 16 Nov 2016 12:26:06 -0800 Subject: Make CPDF_Array take unique_ptrs BUG= Review-Url: https://codereview.chromium.org/2498223005 --- core/fpdfdoc/cpdf_interform.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdfdoc/cpdf_interform.cpp') diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp index 64d15a0d88..c991598a22 100644 --- a/core/fpdfdoc/cpdf_interform.cpp +++ b/core/fpdfdoc/cpdf_interform.cpp @@ -1237,8 +1237,8 @@ CFDF_Document* CPDF_InterForm::ExportToFDF( continue; CFX_WideString fullname = FPDF_GetFullName(pField->GetFieldDict()); - CPDF_Dictionary* pFieldDict = - new CPDF_Dictionary(pDoc->GetByteStringPool()); + auto pFieldDict = + pdfium::MakeUnique(pDoc->GetByteStringPool()); pFieldDict->SetFor("T", new CPDF_String(fullname)); if (pField->GetType() == CPDF_FormField::CheckBox || pField->GetType() == CPDF_FormField::RadioButton) { @@ -1254,7 +1254,7 @@ CFDF_Document* CPDF_InterForm::ExportToFDF( if (pV) pFieldDict->SetFor("V", pV->CloneDirectObject().release()); } - pFields->Add(pFieldDict); + pFields->Add(std::move(pFieldDict)); } } return pDoc; -- cgit v1.2.3