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

Unified Diff: fpdfsdk/fpdf_ext.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: fpdfsdk/fpdf_ext.cpp
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp
index 1f4a1c559095cd81a79a26af3362de1b210a3b59..699a4a513ab50f9f71ef894a9566bdda79dd6aea 100644
--- a/fpdfsdk/fpdf_ext.cpp
+++ b/fpdfsdk/fpdf_ext.cpp
@@ -163,8 +163,7 @@ void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code) {
CPDF_Dictionary* pJSDict = pNameDict->GetDictBy("JavaScript");
CPDF_Array* pArray = pJSDict ? pJSDict->GetArrayBy("Names") : NULL;
if (pArray) {
- int nCount = pArray->GetCount();
- for (int i = 0; i < nCount; i++) {
+ for (size_t i = 0; i < pArray->GetCount(); i++) {
CFX_ByteString cbStr = pArray->GetStringAt(i);
if (cbStr.Compare("com.adobe.acrobat.SharedReview.Register") == 0) {
FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDREVIEW);

Powered by Google App Engine
This is Rietveld 408576698