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

Unified Diff: xfa/fxfa/app/xfa_ffdoc.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
« core/fpdfdoc/cpvt_generateap.cpp ('K') | « fpdfsdk/pdfwindow/PWL_Icon.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_ffdoc.cpp
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp
index 37bafca77a1cdc9c1d6e9ff932417039e3f630c9..04fe075d2c4ac34276a3aa0439bcdc87151e4c39 100644
--- a/xfa/fxfa/app/xfa_ffdoc.cpp
+++ b/xfa/fxfa/app/xfa_ffdoc.cpp
@@ -242,8 +242,7 @@ FX_BOOL CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc) {
CFX_ArrayTemplate<CPDF_Stream*> xfaStreams;
if (pElementXFA->IsArray()) {
CPDF_Array* pXFAArray = (CPDF_Array*)pElementXFA;
- uint32_t count = pXFAArray->GetCount() / 2;
- for (uint32_t i = 0; i < count; i++) {
+ for (size_t i = 0; i < pXFAArray->GetCount() / 2; i++) {
if (CPDF_Stream* pStream = pXFAArray->GetStreamAt(i * 2 + 1))
xfaStreams.Add(pStream);
}
@@ -351,8 +350,7 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName,
CFX_ByteString bsName = PDF_EncodeText(wsName.c_str(), wsName.GetLength());
CPDF_Object* pObject = nametree.LookupValue(bsName);
if (!pObject) {
- int32_t iCount = nametree.GetCount();
- for (int32_t i = 0; i < iCount; i++) {
+ for (size_t i = 0; i < nametree.GetCount(); i++) {
CFX_ByteString bsTemp;
CPDF_Object* pTempObject = nametree.LookupValue(i, bsTemp);
if (bsTemp == bsName) {
« core/fpdfdoc/cpvt_generateap.cpp ('K') | « fpdfsdk/pdfwindow/PWL_Icon.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698