summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_meshstream.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-09 20:13:42 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-09 20:13:42 +0000
commit54ef2cb9eb5b145c6e973e95ccb488e121556ad7 (patch)
tree1cfd20ec575e8d825693256a17ca0f55b53f6b57 /core/fpdfapi/page/cpdf_meshstream.cpp
parenta44b288c4132711d0d9dbcc6885fc98525748ad7 (diff)
downloadpdfium-54ef2cb9eb5b145c6e973e95ccb488e121556ad7.tar.xz
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 <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_meshstream.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_meshstream.cpp8
1 files changed, 4 insertions, 4 deletions
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<std::unique_ptr<CPDF_Function>>& 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<CFX_BitStream>(
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;