diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-09 20:13:42 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-09 20:13:42 +0000 |
commit | 54ef2cb9eb5b145c6e973e95ccb488e121556ad7 (patch) | |
tree | 1cfd20ec575e8d825693256a17ca0f55b53f6b57 /core/fpdfapi/render/cpdf_docrenderdata.cpp | |
parent | a44b288c4132711d0d9dbcc6885fc98525748ad7 (diff) | |
download | pdfium-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/render/cpdf_docrenderdata.cpp')
-rw-r--r-- | core/fpdfapi/render/cpdf_docrenderdata.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/render/cpdf_docrenderdata.cpp b/core/fpdfapi/render/cpdf_docrenderdata.cpp index 6480688f21..568bf76e97 100644 --- a/core/fpdfapi/render/cpdf_docrenderdata.cpp +++ b/core/fpdfapi/render/cpdf_docrenderdata.cpp @@ -62,7 +62,7 @@ void CPDF_DocRenderData::MaybePurgeCachedType3(CPDF_Type3Font* pFont) { } RetainPtr<CPDF_TransferFunc> CPDF_DocRenderData::GetTransferFunc( - CPDF_Object* pObj) { + const CPDF_Object* pObj) { if (!pObj) return nullptr; @@ -73,7 +73,7 @@ RetainPtr<CPDF_TransferFunc> CPDF_DocRenderData::GetTransferFunc( std::unique_ptr<CPDF_Function> pFuncs[3]; bool bUniTransfer = true; bool bIdentity = true; - if (CPDF_Array* pArray = pObj->AsArray()) { + if (const CPDF_Array* pArray = pObj->AsArray()) { bUniTransfer = false; if (pArray->GetCount() < 3) return nullptr; @@ -124,7 +124,7 @@ RetainPtr<CPDF_TransferFunc> CPDF_DocRenderData::GetTransferFunc( return pTransfer; } -void CPDF_DocRenderData::MaybePurgeTransferFunc(CPDF_Object* pObj) { +void CPDF_DocRenderData::MaybePurgeTransferFunc(const CPDF_Object* pObj) { auto it = m_TransferFuncMap.find(pObj); if (it != m_TransferFuncMap.end() && it->second->HasOneRef()) m_TransferFuncMap.erase(it); |