Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2836)

Unified Diff: core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp

Issue 1867183002: Use std::vector as internal storage for CPDF_Array (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
diff --git a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index d70c04c6904d8edcb89f30422d6cc329712bb2ef..31d0beb7f6d2d5758ca883cf62c0366a6650b766 100644
--- a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -1033,8 +1033,7 @@ static int InsertDeletePDFPage(CPDF_Document* pDoc,
if (!pKidList) {
return -1;
}
- int nKids = pKidList->GetCount();
- for (int i = 0; i < nKids; i++) {
+ for (size_t i = 0; i < pKidList->GetCount(); i++) {
CPDF_Dictionary* pKid = pKidList->GetDictAt(i);
if (pKid->GetStringBy("Type") == "Page") {
if (nPagesToGo == 0) {

Powered by Google App Engine
This is Rietveld 408576698