diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-12-09 16:26:21 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-12-09 16:26:21 -0800 |
commit | 035359cd8ddb555fa33b6133db4fd405e4660712 (patch) | |
tree | 89accecac7da250468166168cd502ed7b92c7ce7 /core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp | |
parent | 0c92bed7ade20fe193dce0a481dad48e1be41622 (diff) | |
download | pdfium-035359cd8ddb555fa33b6133db4fd405e4660712.tar.xz |
Get rid of most uses of CFX_PtrArray.
I didn't go whole hog and replace these with std::vector,
but in the mean time, it is silly to cast a typedef for
a template instantiated against void* when we can just
instantiate the template against the actual type.
The ones that remain are actual heterogeneous arrays with
wacky casting.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1518593002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp')
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp index 349b007c43..b3891d78dd 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp @@ -1017,7 +1017,7 @@ static int InsertDeletePDFPage(CPDF_Document* pDoc, int nPagesToGo, CPDF_Dictionary* pPage, FX_BOOL bInsert, - CFX_PtrArray& stackList) { + CFX_ArrayTemplate<CPDF_Dictionary*>& stackList) { CPDF_Array* pKidList = pPages->GetArray("Kids"); if (!pKidList) { return -1; @@ -1088,7 +1088,7 @@ static int InsertNewPage(CPDF_Document* pDoc, pPages->SetAtInteger(FX_BSTRC("Count"), nPages + 1); pPageDict->SetAtReference(FX_BSTRC("Parent"), pDoc, pPages->GetObjNum()); } else { - CFX_PtrArray stack; + CFX_ArrayTemplate<CPDF_Dictionary*> stack; stack.Add(pPages); if (InsertDeletePDFPage(pDoc, pPages, iPage, pPageDict, TRUE, stack) < 0) { return -1; @@ -1129,7 +1129,7 @@ void CPDF_Document::DeletePage(int iPage) { if (iPage < 0 || iPage >= nPages) { return; } - CFX_PtrArray stack; + CFX_ArrayTemplate<CPDF_Dictionary*> stack; stack.Add(pPages); if (InsertDeletePDFPage(this, pPages, iPage, NULL, FALSE, stack) < 0) { return; |