diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-28 17:51:28 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-28 17:51:28 +0000 |
commit | fffdeebfd0ed9806d32eb5609e0fdd015c25c5ac (patch) | |
tree | 7461043e508179a7d33b850486f312c58048e4a8 /core/fpdfapi/render | |
parent | 45a55241d315d25067582d29fcdc1ff8b818965f (diff) | |
download | pdfium-fffdeebfd0ed9806d32eb5609e0fdd015c25c5ac.tar.xz |
Add const/non-const versions of remaining CPDF_Dictionary methods.
GetObjectFor() and GetDirectObjectFor().
Change-Id: I588cd994dfccf0ffd4c8f91362a4806dc109251e
Reviewed-on: https://pdfium-review.googlesource.com/32991
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r-- | core/fpdfapi/render/cpdf_dibsource.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfapi/render/cpdf_dibsource.cpp b/core/fpdfapi/render/cpdf_dibsource.cpp index e9de5289a4..ad828f2372 100644 --- a/core/fpdfapi/render/cpdf_dibsource.cpp +++ b/core/fpdfapi/render/cpdf_dibsource.cpp @@ -342,12 +342,12 @@ bool CPDF_DIBSource::LoadColorInfo(const CPDF_Dictionary* pFormResources, if (m_bImageMask || !m_pDict->KeyExist("ColorSpace")) { if (!m_bImageMask) { - CPDF_Object* pFilter = m_pDict->GetDirectObjectFor("Filter"); + const CPDF_Object* pFilter = m_pDict->GetDirectObjectFor("Filter"); if (pFilter) { ByteString filter; if (pFilter->IsName()) { filter = pFilter->GetString(); - } else if (CPDF_Array* pArray = pFilter->AsArray()) { + } else if (const CPDF_Array* pArray = pFilter->AsArray()) { filter = pArray->GetStringAt(pArray->GetCount() - 1); } @@ -427,11 +427,11 @@ bool CPDF_DIBSource::GetDecodeAndMaskArray(bool* bDefaultDecode, if (m_pDict->KeyExist("SMask")) return true; - CPDF_Object* pMask = m_pDict->GetDirectObjectFor("Mask"); + const CPDF_Object* pMask = m_pDict->GetDirectObjectFor("Mask"); if (!pMask) return true; - if (CPDF_Array* pArray = pMask->AsArray()) { + if (const CPDF_Array* pArray = pMask->AsArray()) { if (pArray->GetCount() >= m_nComponents * 2) { for (uint32_t i = 0; i < m_nComponents; i++) { int min_num = pArray->GetIntegerAt(i * 2); @@ -791,7 +791,7 @@ void CPDF_DIBSource::LoadPalette() { void CPDF_DIBSource::ValidateDictParam() { m_bpc = m_bpc_orig; - CPDF_Object* pFilter = m_pDict->GetDirectObjectFor("Filter"); + const CPDF_Object* pFilter = m_pDict->GetDirectObjectFor("Filter"); if (pFilter) { if (pFilter->IsName()) { ByteString filter = pFilter->GetString(); @@ -805,7 +805,7 @@ void CPDF_DIBSource::ValidateDictParam() { } else if (filter == "DCTDecode") { m_bpc = 8; } - } else if (CPDF_Array* pArray = pFilter->AsArray()) { + } else if (const CPDF_Array* pArray = pFilter->AsArray()) { ByteString filter = pArray->GetStringAt(pArray->GetCount() - 1); if (filter == "CCITTFaxDecode" || filter == "JBIG2Decode") { m_bpc = 1; |