diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-12 18:31:51 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-12 18:31:51 +0000 |
commit | f40380f454042c9783fe30260a0e3df8b32c5c92 (patch) | |
tree | d89f89ee2f813e490ec0ccd5c6195c041f81ab44 /core/fpdfdoc/cpdf_occontext.cpp | |
parent | 8273b37f032a2d9e8e4a83eeda43641365f311a2 (diff) | |
download | pdfium-f40380f454042c9783fe30260a0e3df8b32c5c92.tar.xz |
Rename CPDF_{Array,Dictionary}::GetCount() to size().
Make them compatible with pdfium::CollectionSize().
Change-Id: Ibef3b182e35a7eca7c656cf590462782de0cc157
Reviewed-on: https://pdfium-review.googlesource.com/c/43937
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_occontext.cpp')
-rw-r--r-- | core/fpdfdoc/cpdf_occontext.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfdoc/cpdf_occontext.cpp b/core/fpdfdoc/cpdf_occontext.cpp index 4116fdb256..1cfa29cd3a 100644 --- a/core/fpdfdoc/cpdf_occontext.cpp +++ b/core/fpdfdoc/cpdf_occontext.cpp @@ -17,7 +17,7 @@ int32_t FindGroup(const CPDF_Array* pArray, const CPDF_Dictionary* pGroupDict) { if (!pArray || !pGroupDict) return -1; - for (size_t i = 0; i < pArray->GetCount(); i++) { + for (size_t i = 0; i < pArray->size(); i++) { if (pArray->GetDictAt(i) == pGroupDict) return i; } @@ -33,7 +33,7 @@ bool HasIntent(const CPDF_Dictionary* pDict, ByteString bsIntent; if (const CPDF_Array* pArray = pIntent->AsArray()) { - for (size_t i = 0; i < pArray->GetCount(); i++) { + for (size_t i = 0; i < pArray->size(); i++) { bsIntent = pArray->GetStringAt(i); if (bsIntent == "All" || bsIntent == csElement) return true; @@ -63,7 +63,7 @@ CPDF_Dictionary* GetConfig(CPDF_Document* pDoc, if (!pConfigs) return pConfig; - for (size_t i = 0; i < pConfigs->GetCount(); i++) { + for (size_t i = 0; i < pConfigs->size(); i++) { CPDF_Dictionary* pFind = pConfigs->GetDictAt(i); if (pFind && HasIntent(pFind, "View", "View")) return pFind; @@ -122,7 +122,7 @@ bool CPDF_OCContext::LoadOCGStateFromConfig( return bState; ByteString csFind = csConfig + "State"; - for (size_t i = 0; i < pArray->GetCount(); i++) { + for (size_t i = 0; i < pArray->size(); i++) { CPDF_Dictionary* pUsage = pArray->GetDictAt(i); if (!pUsage) continue; @@ -213,7 +213,7 @@ bool CPDF_OCContext::GetOCGVE(const CPDF_Array* pExpression, int nLevel) { return false; bool bValue = false; - for (size_t i = 1; i < pExpression->GetCount(); i++) { + for (size_t i = 1; i < pExpression->size(); i++) { const CPDF_Object* pOCGObj = pExpression->GetDirectObjectAt(1); if (!pOCGObj) continue; @@ -258,7 +258,7 @@ bool CPDF_OCContext::LoadOCMDState(const CPDF_Dictionary* pOCMDDict) { // At least one entry of OCGs needs to be a valid dictionary for it to be // considered present. See "OCGs" in table 4.49 in the PDF 1.7 spec. bool bValidEntrySeen = false; - for (size_t i = 0; i < pArray->GetCount(); i++) { + for (size_t i = 0; i < pArray->size(); i++) { bool bItem = true; const CPDF_Dictionary* pItemDict = pArray->GetDictAt(i); if (!pItemDict) |