From 54ef2cb9eb5b145c6e973e95ccb488e121556ad7 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 9 May 2018 20:13:42 +0000 Subject: Mark numerious pointers as const. They are mostly CPDF_Object* and derived classes, but others that should be are marked const as well. Change-Id: Ib3344d7d8db90940df8edc97c0dd6c59da080541 Reviewed-on: https://pdfium-review.googlesource.com/32180 Commit-Queue: Lei Zhang Reviewed-by: Henrique Nakashima --- core/fpdfapi/parser/cpdf_document.cpp | 5 +++-- core/fpdfapi/parser/cpdf_document.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'core/fpdfapi/parser') diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp index 13f5db244b..fea0bddb33 100644 --- a/core/fpdfapi/parser/cpdf_document.cpp +++ b/core/fpdfapi/parser/cpdf_document.cpp @@ -479,8 +479,9 @@ RetainPtr CPDF_Document::LoadFontFile(CPDF_Stream* pStream) { return m_pDocPage->GetFontFileStreamAcc(pStream); } -CPDF_ColorSpace* CPDF_Document::LoadColorSpace(CPDF_Object* pCSObj, - CPDF_Dictionary* pResources) { +CPDF_ColorSpace* CPDF_Document::LoadColorSpace( + const CPDF_Object* pCSObj, + const CPDF_Dictionary* pResources) { return m_pDocPage->GetColorSpace(pCSObj, pResources); } diff --git a/core/fpdfapi/parser/cpdf_document.h b/core/fpdfapi/parser/cpdf_document.h index 8690efed80..6357049777 100644 --- a/core/fpdfapi/parser/cpdf_document.h +++ b/core/fpdfapi/parser/cpdf_document.h @@ -83,8 +83,8 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { // |pFontDict| must not be null. CPDF_Font* LoadFont(CPDF_Dictionary* pFontDict); - CPDF_ColorSpace* LoadColorSpace(CPDF_Object* pCSObj, - CPDF_Dictionary* pResources = nullptr); + CPDF_ColorSpace* LoadColorSpace(const CPDF_Object* pCSObj, + const CPDF_Dictionary* pResources = nullptr); CPDF_Pattern* LoadPattern(CPDF_Object* pObj, bool bShading, -- cgit v1.2.3