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_bookmarktree.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fpdfdoc/cpdf_bookmarktree.cpp') diff --git a/core/fpdfdoc/cpdf_bookmarktree.cpp b/core/fpdfdoc/cpdf_bookmarktree.cpp index 33c9f3d15b..3b178f01b1 100644 --- a/core/fpdfdoc/cpdf_bookmarktree.cpp +++ b/core/fpdfdoc/cpdf_bookmarktree.cpp @@ -14,7 +14,7 @@ CPDF_BookmarkTree::~CPDF_BookmarkTree() {} CPDF_Bookmark CPDF_BookmarkTree::GetFirstChild( const CPDF_Bookmark& parent) const { - CPDF_Dictionary* pParentDict = parent.GetDict(); + const CPDF_Dictionary* pParentDict = parent.GetDict(); if (pParentDict) return CPDF_Bookmark(pParentDict->GetDictFor("First")); @@ -22,17 +22,17 @@ CPDF_Bookmark CPDF_BookmarkTree::GetFirstChild( if (!pRoot) return CPDF_Bookmark(); - CPDF_Dictionary* pOutlines = pRoot->GetDictFor("Outlines"); + const CPDF_Dictionary* pOutlines = pRoot->GetDictFor("Outlines"); return pOutlines ? CPDF_Bookmark(pOutlines->GetDictFor("First")) : CPDF_Bookmark(); } CPDF_Bookmark CPDF_BookmarkTree::GetNextSibling( const CPDF_Bookmark& bookmark) const { - CPDF_Dictionary* pDict = bookmark.GetDict(); + const CPDF_Dictionary* pDict = bookmark.GetDict(); if (!pDict) return CPDF_Bookmark(); - CPDF_Dictionary* pNext = pDict->GetDictFor("Next"); + const CPDF_Dictionary* pNext = pDict->GetDictFor("Next"); return pNext == pDict ? CPDF_Bookmark() : CPDF_Bookmark(pNext); } -- cgit v1.2.3