From de579ab0092d43fe037c381710da998b9ff823e9 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 25 May 2018 21:49:49 +0000 Subject: Add proper const/non-const versions of CPDF_Dictionary::GetArrayFor(). BUG=pdfium:234 Change-Id: I5c900aa0547afef0c60de35422b4ee489daa6cfb Reviewed-on: https://pdfium-review.googlesource.com/32913 Commit-Queue: Lei Zhang Reviewed-by: dsinclair --- core/fpdfapi/render/cpdf_dibsource.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi/render') diff --git a/core/fpdfapi/render/cpdf_dibsource.cpp b/core/fpdfapi/render/cpdf_dibsource.cpp index b2ebc74279..e9de5289a4 100644 --- a/core/fpdfapi/render/cpdf_dibsource.cpp +++ b/core/fpdfapi/render/cpdf_dibsource.cpp @@ -359,7 +359,7 @@ bool CPDF_DIBSource::LoadColorInfo(const CPDF_Dictionary* pFormResources, } m_bImageMask = true; m_bpc = m_nComponents = 1; - CPDF_Array* pDecode = m_pDict->GetArrayFor("Decode"); + const CPDF_Array* pDecode = m_pDict->GetArrayFor("Decode"); m_bDefaultDecode = !pDecode || !pDecode->GetIntegerAt(0); return true; } @@ -398,7 +398,7 @@ bool CPDF_DIBSource::GetDecodeAndMaskArray(bool* bDefaultDecode, m_CompData.resize(m_nComponents); int max_data = (1 << m_bpc) - 1; - CPDF_Array* pDecode = m_pDict->GetArrayFor("Decode"); + const CPDF_Array* pDecode = m_pDict->GetArrayFor("Decode"); if (pDecode) { for (uint32_t i = 0; i < m_nComponents; i++) { m_CompData[i].m_DecodeMin = pDecode->GetNumberAt(i * 2); @@ -658,7 +658,7 @@ CPDF_DIBSource::LoadState CPDF_DIBSource::StartLoadMask() { return m_pMaskStream ? StartLoadMaskDIB() : LoadState::kSuccess; } - CPDF_Array* pMatte = m_pMaskStream->GetDict()->GetArrayFor("Matte"); + const CPDF_Array* pMatte = m_pMaskStream->GetDict()->GetArrayFor("Matte"); if (pMatte && m_pColorSpace && m_Family != PDFCS_PATTERN && m_pColorSpace->CountComponents() <= m_nComponents) { std::vector colors(m_nComponents); -- cgit v1.2.3