From b1ec280837cc6e1932754ef40de26d12b77aa910 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 25 May 2018 21:55:24 +0000 Subject: Add proper const/non-const versions of CPDF_Dictionary::GetDictFor(). BUG=pdfium:234 Change-Id: I6fde00c976ad4bb9cab632f465cf292f5b1da3d2 Reviewed-on: https://pdfium-review.googlesource.com/32914 Commit-Queue: Lei Zhang Reviewed-by: dsinclair --- core/fpdfapi/parser/cpdf_document.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi/parser/cpdf_document.h') diff --git a/core/fpdfapi/parser/cpdf_document.h b/core/fpdfapi/parser/cpdf_document.h index b169175668..356d341302 100644 --- a/core/fpdfapi/parser/cpdf_document.h +++ b/core/fpdfapi/parser/cpdf_document.h @@ -115,10 +115,10 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { protected: // Retrieve page count information by getting count value from the tree nodes - int RetrievePageCount() const; + int RetrievePageCount(); // When this method is called, m_pTreeTraversal[level] exists. CPDF_Dictionary* TraversePDFPages(int iPage, int* nPagesToGo, size_t level); - int FindPageIndex(CPDF_Dictionary* pNode, + int FindPageIndex(const CPDF_Dictionary* pNode, uint32_t* skip_count, uint32_t objnum, int* index, @@ -126,7 +126,8 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { std::unique_ptr ParseIndirectObject(uint32_t objnum) override; void LoadDocInternal(); size_t CalculateEncodingDict(int charset, CPDF_Dictionary* pBaseDict); - CPDF_Dictionary* GetPagesDict() const; + const CPDF_Dictionary* GetPagesDict() const; + CPDF_Dictionary* GetPagesDict(); CPDF_Dictionary* ProcessbCJK( CPDF_Dictionary* pBaseDict, int charset, -- cgit v1.2.3