From 710fa99b0bd26e6761c4481b4b9b6d26d2954c3e Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 25 May 2018 16:24:48 +0000 Subject: Mark CPDF_Object pointers in pattern code as const. Change-Id: Id7bf252ebe25c92d26065d1138a445ebb2f78d0b Reviewed-on: https://pdfium-review.googlesource.com/32187 Reviewed-by: dsinclair Reviewed-by: Ryan Harrison Commit-Queue: Ryan Harrison --- core/fpdfapi/page/cpdf_docpagedata.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi/page/cpdf_docpagedata.cpp') diff --git a/core/fpdfapi/page/cpdf_docpagedata.cpp b/core/fpdfapi/page/cpdf_docpagedata.cpp index 79e148c72a..92dca138cf 100644 --- a/core/fpdfapi/page/cpdf_docpagedata.cpp +++ b/core/fpdfapi/page/cpdf_docpagedata.cpp @@ -457,13 +457,13 @@ void CPDF_DocPageData::MaybePurgeIccProfile(const CPDF_Stream* pProfileStream) { } RetainPtr CPDF_DocPageData::GetFontFileStreamAcc( - CPDF_Stream* pFontStream) { + const CPDF_Stream* pFontStream) { ASSERT(pFontStream); auto it = m_FontFileMap.find(pFontStream); if (it != m_FontFileMap.end()) return it->second; - CPDF_Dictionary* pFontDict = pFontStream->GetDict(); + const CPDF_Dictionary* pFontDict = pFontStream->GetDict(); int32_t org_size = pFontDict->GetIntegerFor("Length1") + pFontDict->GetIntegerFor("Length2") + pFontDict->GetIntegerFor("Length3"); @@ -495,7 +495,7 @@ CPDF_CountedColorSpace* CPDF_DocPageData::FindColorSpacePtr( } CPDF_CountedPattern* CPDF_DocPageData::FindPatternPtr( - CPDF_Object* pPatternObj) const { + const CPDF_Object* pPatternObj) const { if (!pPatternObj) return nullptr; -- cgit v1.2.3