summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/fpdf_flatten.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
index 07fbd7cd9e..2850c37bfb 100644
--- a/fpdfsdk/fpdf_flatten.cpp
+++ b/fpdfsdk/fpdf_flatten.cpp
@@ -299,8 +299,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
pPageXObject = pRes->SetNewFor<CPDF_Dictionary>("XObject");
ByteString key;
- int nStreams = pdfium::CollectionSize<int>(ObjectArray);
- if (nStreams > 0) {
+ if (!ObjectArray.empty()) {
int i = 0;
while (i < INT_MAX) {
ByteString sKey = ByteString::Format("FFT%d", i);
@@ -326,7 +325,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
pNewOXbjectDic->SetRectFor("BBox", rcBBox);
}
- for (int i = 0; i < nStreams; i++) {
+ for (size_t i = 0; i < ObjectArray.size(); ++i) {
CPDF_Dictionary* pAnnotDic = ObjectArray[i];
if (!pAnnotDic)
continue;