summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/doc_utils.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-04-11 10:02:09 -0700
committerWei Li <weili@chromium.org>2016-04-11 10:02:09 -0700
commite1aebd43b0c75133f94f8b141b33d12e2e715524 (patch)
tree863aded8c706db162eb3f69d6482100f9d61b842 /core/fpdfdoc/doc_utils.cpp
parent2d4a4fc372159ac7562abea48498b6ab72c2f321 (diff)
downloadpdfium-e1aebd43b0c75133f94f8b141b33d12e2e715524.tar.xz
Use std::vector as internal storage for CPDF_Array
Replace the usage of CFX_ArrayTemplate inside CPDF_Array, which has non-standard APIs such as GetSize() returns int. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1867183002 .
Diffstat (limited to 'core/fpdfdoc/doc_utils.cpp')
-rw-r--r--core/fpdfdoc/doc_utils.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fpdfdoc/doc_utils.cpp b/core/fpdfdoc/doc_utils.cpp
index 7c66b879cb..404353847f 100644
--- a/core/fpdfdoc/doc_utils.cpp
+++ b/core/fpdfdoc/doc_utils.cpp
@@ -27,8 +27,7 @@ CPDF_Object* SearchNumberNode(const CPDF_Dictionary* pNode, int num) {
}
CPDF_Array* pNumbers = pNode->GetArrayBy("Nums");
if (pNumbers) {
- uint32_t dwCount = pNumbers->GetCount() / 2;
- for (uint32_t i = 0; i < dwCount; i++) {
+ for (size_t i = 0; i < pNumbers->GetCount() / 2; i++) {
int index = pNumbers->GetIntegerAt(i * 2);
if (num == index) {
return pNumbers->GetDirectObjectAt(i * 2 + 1);
@@ -43,7 +42,7 @@ CPDF_Object* SearchNumberNode(const CPDF_Dictionary* pNode, int num) {
if (!pKids) {
return NULL;
}
- for (uint32_t i = 0; i < pKids->GetCount(); i++) {
+ for (size_t i = 0; i < pKids->GetCount(); i++) {
CPDF_Dictionary* pKid = pKids->GetDictAt(i);
if (!pKid) {
continue;