summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-27 18:44:06 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-27 18:44:06 +0000
commita257eb4a40302db5463f650b3cb1b611bb5cb7de (patch)
tree96996442ea24cb6791f4dc643c640fd80dfe088d /core/fpdfapi
parent4f1c7f33f765b7cf5d8770d725054f74073bab39 (diff)
downloadpdfium-a257eb4a40302db5463f650b3cb1b611bb5cb7de.tar.xz
Remove CollectionSize from FPDF_DataDecode
Bug: pdfium:774 Change-Id: I3fcde6fba46d21affa63d79fab2d83f47c9c5f84 Reviewed-on: https://pdfium-review.googlesource.com/19450 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/parser/fpdf_parser_decode.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/fpdf_parser_decode.cpp b/core/fpdfapi/parser/fpdf_parser_decode.cpp
index 8a31643632..9532b8242d 100644
--- a/core/fpdfapi/parser/fpdf_parser_decode.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_decode.cpp
@@ -23,7 +23,6 @@
#include "core/fxcodec/fx_codec.h"
#include "core/fxcrt/fx_extension.h"
#include "third_party/base/numerics/safe_math.h"
-#include "third_party/base/stl_util.h"
namespace {
@@ -354,8 +353,8 @@ bool PDF_DataDecode(const uint8_t* src_buf,
}
uint8_t* last_buf = const_cast<uint8_t*>(src_buf);
uint32_t last_size = src_size;
- int nSize = pdfium::CollectionSize<int>(DecoderArray);
- for (int i = 0; i < nSize; ++i) {
+ size_t nSize = DecoderArray.size();
+ for (size_t i = 0; i < nSize; ++i) {
int estimated_size = i == nSize - 1 ? last_estimated_size : 0;
ByteString decoder = DecoderArray[i].first;
CPDF_Dictionary* pParam = ToDictionary(DecoderArray[i].second);