From e0cb687c71d555b55cc30ec59c9b338a0e83f77f Mon Sep 17 00:00:00 2001 From: thestig Date: Thu, 1 Sep 2016 13:41:10 -0700 Subject: Use unsigned page indexes in CPDF_HintTables. Fix up callers from CPDF_DataAvail. Review-Url: https://codereview.chromium.org/2294383003 --- core/fpdfapi/fpdf_parser/include/cpdf_data_avail.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'core/fpdfapi/fpdf_parser/include') diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_data_avail.h b/core/fpdfapi/fpdf_parser/include/cpdf_data_avail.h index 4adedba36c..b93394cd8f 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_data_avail.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_data_avail.h @@ -97,7 +97,7 @@ class CPDF_DataAvail final { DocAvailStatus IsDocAvail(DownloadHints* pHints); void SetDocument(CPDF_Document* pDoc); - DocAvailStatus IsPageAvail(int iPage, DownloadHints* pHints); + DocAvailStatus IsPageAvail(uint32_t dwPage, DownloadHints* pHints); DocFormStatus IsFormAvail(DownloadHints* pHints); DocLinearizationStatus IsLinearizedPDF(); FX_BOOL IsLinearized(); @@ -166,13 +166,14 @@ class CPDF_DataAvail final { FX_BOOL LoadAllXref(DownloadHints* pHints); FX_BOOL LoadAllFile(DownloadHints* pHints); DocAvailStatus CheckLinearizedData(DownloadHints* pHints); - FX_BOOL CheckPageAnnots(int iPage, DownloadHints* pHints); + FX_BOOL CheckPageAnnots(uint32_t dwPage, DownloadHints* pHints); - DocAvailStatus CheckLinearizedFirstPage(int iPage, DownloadHints* pHints); + DocAvailStatus CheckLinearizedFirstPage(uint32_t dwPage, + DownloadHints* pHints); FX_BOOL HaveResourceAncestor(CPDF_Dictionary* pDict); - FX_BOOL CheckPage(int32_t iPage, DownloadHints* pHints); + FX_BOOL CheckPage(uint32_t dwPage, DownloadHints* pHints); FX_BOOL LoadDocPages(DownloadHints* pHints); - FX_BOOL LoadDocPage(int32_t iPage, DownloadHints* pHints); + FX_BOOL LoadDocPage(uint32_t dwPage, DownloadHints* pHints); FX_BOOL CheckPageNode(PageNode& pageNodes, int32_t iPage, int32_t& iCount, @@ -185,8 +186,8 @@ class CPDF_DataAvail final { PageNode* pPageNode, DownloadHints* pHints); FX_BOOL CheckPageCount(DownloadHints* pHints); - bool IsFirstCheck(int iPage); - void ResetFirstCheck(int iPage); + bool IsFirstCheck(uint32_t dwPage); + void ResetFirstCheck(uint32_t dwPage); FX_BOOL IsDataAvail(FX_FILESIZE offset, uint32_t size, DownloadHints* pHints); FileAvail* const m_pFileAvail; -- cgit v1.2.3