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_pagelabel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdfdoc/cpdf_pagelabel.cpp') diff --git a/core/fpdfdoc/cpdf_pagelabel.cpp b/core/fpdfdoc/cpdf_pagelabel.cpp index f06e4018bb..e6a7780a95 100644 --- a/core/fpdfdoc/cpdf_pagelabel.cpp +++ b/core/fpdfdoc/cpdf_pagelabel.cpp @@ -89,12 +89,12 @@ Optional CPDF_PageLabel::GetLabel(int nPage) const { if (!pPDFRoot) return {}; - CPDF_Dictionary* pLabels = pPDFRoot->GetDictFor("PageLabels"); + const CPDF_Dictionary* pLabels = pPDFRoot->GetDictFor("PageLabels"); if (!pLabels) return {}; CPDF_NumberTree numberTree(pLabels); - CPDF_Object* pValue = nullptr; + const CPDF_Object* pValue = nullptr; int n = nPage; while (n >= 0) { pValue = numberTree.LookupValue(n); @@ -106,7 +106,7 @@ Optional CPDF_PageLabel::GetLabel(int nPage) const { WideString label; if (pValue) { pValue = pValue->GetDirect(); - if (CPDF_Dictionary* pLabel = pValue->AsDictionary()) { + if (const CPDF_Dictionary* pLabel = pValue->AsDictionary()) { if (pLabel->KeyExist("P")) label += pLabel->GetUnicodeTextFor("P"); -- cgit v1.2.3