From 5cee3f28ead05cb336377483e24664c004af8b0a Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 25 May 2018 21:48:49 +0000 Subject: Mark more CPDF_Objects as const in action and bookmark code. Change-Id: Ib5f4cdb9c7f9c33561028a85029649ba68f4a6e5 Reviewed-on: https://pdfium-review.googlesource.com/32912 Commit-Queue: Lei Zhang Reviewed-by: dsinclair --- core/fpdfdoc/cpdf_structelement.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/fpdfdoc/cpdf_structelement.h') diff --git a/core/fpdfdoc/cpdf_structelement.h b/core/fpdfdoc/cpdf_structelement.h index 51ee93bd54..2586d9ca13 100644 --- a/core/fpdfdoc/cpdf_structelement.h +++ b/core/fpdfdoc/cpdf_structelement.h @@ -28,7 +28,7 @@ class CPDF_StructKid { enum { Invalid, Element, PageContent, StreamContent, Object } m_Type; RetainPtr m_pElement; // For Element. - UnownedPtr m_pDict; // For Element. + UnownedPtr m_pDict; // For Element. uint32_t m_PageObjNum; // For PageContent, StreamContent, Object. uint32_t m_RefObjNum; // For StreamContent, Object. uint32_t m_ContentId; // For PageContent, StreamContent. @@ -41,7 +41,7 @@ class CPDF_StructElement : public Retainable { const ByteString& GetType() const { return m_Type; } const ByteString& GetTitle() const { return m_Title; } - CPDF_Dictionary* GetDict() const { return m_pDict.Get(); } + const CPDF_Dictionary* GetDict() const { return m_pDict.Get(); } size_t CountKids() const; CPDF_StructElement* GetKidIfElement(size_t index) const; @@ -50,15 +50,15 @@ class CPDF_StructElement : public Retainable { private: CPDF_StructElement(CPDF_StructTree* pTree, CPDF_StructElement* pParent, - CPDF_Dictionary* pDict); + const CPDF_Dictionary* pDict); ~CPDF_StructElement() override; - void LoadKids(CPDF_Dictionary* pDict); + void LoadKids(const CPDF_Dictionary* pDict); void LoadKid(uint32_t PageObjNum, CPDF_Object* pObj, CPDF_StructKid* pKid); UnownedPtr const m_pTree; UnownedPtr const m_pParent; - UnownedPtr const m_pDict; + UnownedPtr const m_pDict; ByteString m_Type; ByteString m_Title; std::vector m_Kids; -- cgit v1.2.3