diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-25 21:48:49 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-25 21:48:49 +0000 |
commit | 5cee3f28ead05cb336377483e24664c004af8b0a (patch) | |
tree | 8fb5db3232e1359831682c809be3ec10de1ce1e0 /core/fpdfdoc/cpdf_structtree.h | |
parent | 1f17bd73afa6b1b79ec4a2f81c995b43d15a9814 (diff) | |
download | pdfium-5cee3f28ead05cb336377483e24664c004af8b0a.tar.xz |
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 <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_structtree.h')
-rw-r--r-- | core/fpdfdoc/cpdf_structtree.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/fpdfdoc/cpdf_structtree.h b/core/fpdfdoc/cpdf_structtree.h index 99342fb6de..13bf148677 100644 --- a/core/fpdfdoc/cpdf_structtree.h +++ b/core/fpdfdoc/cpdf_structtree.h @@ -34,12 +34,14 @@ class CPDF_StructTree { const CPDF_Dictionary* GetTreeRoot() const { return m_pTreeRoot.Get(); } private: + using StructElementMap = + std::map<const CPDF_Dictionary*, RetainPtr<CPDF_StructElement>>; + void LoadPageTree(const CPDF_Dictionary* pPageDict); - RetainPtr<CPDF_StructElement> AddPageNode( - CPDF_Dictionary* pElement, - std::map<CPDF_Dictionary*, RetainPtr<CPDF_StructElement>>* map, - int nLevel); - bool AddTopLevelNode(CPDF_Dictionary* pDict, + RetainPtr<CPDF_StructElement> AddPageNode(const CPDF_Dictionary* pElement, + StructElementMap* map, + int nLevel); + bool AddTopLevelNode(const CPDF_Dictionary* pDict, const RetainPtr<CPDF_StructElement>& pElement); UnownedPtr<const CPDF_Dictionary> const m_pTreeRoot; |