summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfsave.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-16 12:26:06 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-16 12:26:06 -0800
commit8a3aa459fc5284f51bcd7e98e95bf6214f47bb67 (patch)
tree13fb383936d679aded19054f4e7a0387dd52de76 /fpdfsdk/fpdfsave.cpp
parent14a60c50b10de1d9e4edd3629ea210a816940a75 (diff)
downloadpdfium-8a3aa459fc5284f51bcd7e98e95bf6214f47bb67.tar.xz
Make CPDF_Array take unique_ptrs
BUG= Review-Url: https://codereview.chromium.org/2498223005
Diffstat (limited to 'fpdfsdk/fpdfsave.cpp')
-rw-r--r--fpdfsdk/fpdfsave.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp
index e5d7a409ae..c9043249e1 100644
--- a/fpdfsdk/fpdfsave.cpp
+++ b/fpdfsdk/fpdfsave.cpp
@@ -183,9 +183,9 @@ bool SaveXFADocumentData(CPDFXFA_Context* pContext,
CPDF_Stream* pData = pPDFDocument->NewIndirect<CPDF_Stream>();
pData->InitStreamFromFile(pDsfileWrite.get(), pDataDict);
iLast = pArray->GetCount() - 2;
- pArray->InsertAt(iLast, new CPDF_String("datasets", false));
- pArray->InsertAt(iLast + 1,
- new CPDF_Reference(pPDFDocument, pData->GetObjNum()));
+ pArray->InsertNewAt<CPDF_String>(iLast, "datasets", false);
+ pArray->InsertNewAt<CPDF_Reference>(iLast + 1, pPDFDocument,
+ pData->GetObjNum());
}
fileList->push_back(std::move(pDsfileWrite));
}
@@ -205,9 +205,9 @@ bool SaveXFADocumentData(CPDFXFA_Context* pContext,
CPDF_Stream* pData = pPDFDocument->NewIndirect<CPDF_Stream>();
pData->InitStreamFromFile(pfileWrite.get(), pDataDict);
iLast = pArray->GetCount() - 2;
- pArray->InsertAt(iLast, new CPDF_String("form", false));
- pArray->InsertAt(iLast + 1,
- new CPDF_Reference(pPDFDocument, pData->GetObjNum()));
+ pArray->InsertNewAt<CPDF_String>(iLast, "form", false);
+ pArray->InsertNewAt<CPDF_Reference>(iLast + 1, pPDFDocument,
+ pData->GetObjNum());
}
fileList->push_back(std::move(pfileWrite));
}