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 /fpdfsdk/fpdf_view.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 'fpdfsdk/fpdf_view.cpp')
-rw-r--r-- | fpdfsdk/fpdf_view.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp index 247a90240b..83d7e4a6cb 100644 --- a/fpdfsdk/fpdf_view.cpp +++ b/fpdfsdk/fpdf_view.cpp @@ -985,14 +985,14 @@ FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document) { FPDF_EXPORT size_t FPDF_CALLCONV FPDF_VIEWERREF_GetPrintPageRangeCount(FPDF_PAGERANGE pagerange) { const CPDF_Array* pArray = CPDFArrayFromFPDFPageRange(pagerange); - return pArray ? pArray->GetCount() : 0; + return pArray ? pArray->size() : 0; } FPDF_EXPORT int FPDF_CALLCONV FPDF_VIEWERREF_GetPrintPageRangeElement(FPDF_PAGERANGE pagerange, size_t index) { const CPDF_Array* pArray = CPDFArrayFromFPDFPageRange(pagerange); - if (!pArray || index >= pArray->GetCount()) + if (!pArray || index >= pArray->size()) return -1; return pArray->GetIntegerAt(index); } @@ -1047,7 +1047,7 @@ FPDF_CountNamedDests(FPDF_DOCUMENT document) { pdfium::base::CheckedNumeric<FPDF_DWORD> count = nameTree.GetCount(); const CPDF_Dictionary* pDest = pRoot->GetDictFor("Dests"); if (pDest) - count += pDest->GetCount(); + count += pDest->size(); if (!count.IsValid()) return 0; @@ -1145,7 +1145,7 @@ FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDF_GetNamedDest(FPDF_DOCUMENT document, return nullptr; pdfium::base::CheckedNumeric<int> checked_count = count; - checked_count += pDest->GetCount(); + checked_count += pDest->size(); if (!checked_count.IsValid() || index >= checked_count.ValueOrDie()) return nullptr; |