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

Unified Diff: core/fpdfapi/fpdf_edit/fpdf_edit_create.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_create.cpp
diff --git a/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 323602b0e10aa5e44b85d55b5674c3c422a3bd4c..74b16c86be1ea4bec662c75e30e204835f8ba664 100644
--- a/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -97,7 +97,7 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj,
}
offset += 1;
const CPDF_Array* p = pObj->AsArray();
- for (uint32_t i = 0; i < p->GetCount(); i++) {
+ for (size_t i = 0; i < p->GetCount(); i++) {
CPDF_Object* pElement = p->GetObjectAt(i);
if (pElement->GetObjNum()) {
if (pFile->AppendString(" ") < 0) {
@@ -1203,7 +1203,7 @@ int32_t CPDF_Creator::WriteDirectObj(uint32_t objnum,
}
m_Offset += 1;
const CPDF_Array* p = pObj->AsArray();
- for (uint32_t i = 0; i < p->GetCount(); i++) {
+ for (size_t i = 0; i < p->GetCount(); i++) {
CPDF_Object* pElement = p->GetObjectAt(i);
if (pElement->GetObjNum()) {
if (m_File.AppendString(" ") < 0) {

Powered by Google App Engine
This is Rietveld 408576698