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/page/cpdf_meshstream.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fpdfapi/page/cpdf_meshstream.cpp') diff --git a/core/fpdfapi/page/cpdf_meshstream.cpp b/core/fpdfapi/page/cpdf_meshstream.cpp index 579678af41..57a5dd1da1 100644 --- a/core/fpdfapi/page/cpdf_meshstream.cpp +++ b/core/fpdfapi/page/cpdf_meshstream.cpp @@ -93,8 +93,8 @@ CPDF_MeshVertex::~CPDF_MeshVertex() = default; CPDF_MeshStream::CPDF_MeshStream( ShadingType type, const std::vector>& funcs, - CPDF_Stream* pShadingStream, - CPDF_ColorSpace* pCS) + const CPDF_Stream* pShadingStream, + const CPDF_ColorSpace* pCS) : m_type(type), m_funcs(funcs), m_pShadingStream(pShadingStream), @@ -120,7 +120,7 @@ bool CPDF_MeshStream::Load() { m_pStream->LoadAllDataFiltered(); m_BitStream = pdfium::MakeUnique( pdfium::make_span(m_pStream->GetData(), m_pStream->GetSize())); - CPDF_Dictionary* pDict = m_pShadingStream->GetDict(); + const CPDF_Dictionary* pDict = m_pShadingStream->GetDict(); m_nCoordBits = pDict->GetIntegerFor("BitsPerCoordinate"); m_nComponentBits = pDict->GetIntegerFor("BitsPerComponent"); if (ShouldCheckBPC(m_type)) { @@ -139,7 +139,7 @@ bool CPDF_MeshStream::Load() { return false; m_nComponents = m_funcs.empty() ? nComponents : 1; - CPDF_Array* pDecode = pDict->GetArrayFor("Decode"); + const CPDF_Array* pDecode = pDict->GetArrayFor("Decode"); if (!pDecode || pDecode->GetCount() != 4 + m_nComponents * 2) return false; -- cgit v1.2.3