From 0158106c1c77c6af4f7195d086cb0f2d129de838 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 30 Aug 2017 14:19:26 -0700 Subject: Add truly const versions of CPDF_Document getters. Instead of only having CPDF_Dictionary* GetRoot() const, provide const CPDF_Dictionary* GetRoot() const and CPDF_Dictionary* GetRoot(). Do the same for GetInfo(). Change-Id: I6eae1208d38327fcdc7d0cd75069a01c95f4a92a Reviewed-on: https://pdfium-review.googlesource.com/11671 Commit-Queue: Lei Zhang Reviewed-by: Tom Sepez Reviewed-by: dsinclair --- core/fpdfdoc/cpdf_pagelabel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fpdfdoc/cpdf_pagelabel.cpp') diff --git a/core/fpdfdoc/cpdf_pagelabel.cpp b/core/fpdfdoc/cpdf_pagelabel.cpp index 41cbb8974e..7b5e66e585 100644 --- a/core/fpdfdoc/cpdf_pagelabel.cpp +++ b/core/fpdfdoc/cpdf_pagelabel.cpp @@ -84,7 +84,7 @@ bool CPDF_PageLabel::GetLabel(int nPage, CFX_WideString* wsLabel) const { if (nPage < 0 || nPage >= m_pDocument->GetPageCount()) return false; - CPDF_Dictionary* pPDFRoot = m_pDocument->GetRoot(); + const CPDF_Dictionary* pPDFRoot = m_pDocument->GetRoot(); if (!pPDFRoot) return false; @@ -124,7 +124,7 @@ int32_t CPDF_PageLabel::GetPageByLabel(const CFX_ByteStringC& bsLabel) const { if (!m_pDocument) return -1; - CPDF_Dictionary* pPDFRoot = m_pDocument->GetRoot(); + const CPDF_Dictionary* pPDFRoot = m_pDocument->GetRoot(); if (!pPDFRoot) return -1; -- cgit v1.2.3