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/page/cpdf_patterncs.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/page/cpdf_patterncs.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_patterncs.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/fpdfapi/page/cpdf_patterncs.cpp b/core/fpdfapi/page/cpdf_patterncs.cpp index 37e91aa4e0..69be3d2b82 100644 --- a/core/fpdfapi/page/cpdf_patterncs.cpp +++ b/core/fpdfapi/page/cpdf_patterncs.cpp @@ -16,7 +16,8 @@ CPDF_PatternCS::CPDF_PatternCS(CPDF_Document* pDoc) m_pCountedBaseCS(nullptr) {} CPDF_PatternCS::~CPDF_PatternCS() { - CPDF_ColorSpace* pCS = m_pCountedBaseCS ? m_pCountedBaseCS->get() : nullptr; + const CPDF_ColorSpace* pCS = + m_pCountedBaseCS ? m_pCountedBaseCS->get() : nullptr; if (pCS && m_pDocument) { auto* pPageData = m_pDocument->GetPageData(); if (pPageData) @@ -29,9 +30,9 @@ void CPDF_PatternCS::InitializeStockPattern() { } uint32_t CPDF_PatternCS::v_Load(CPDF_Document* pDoc, - CPDF_Array* pArray, - std::set<CPDF_Object*>* pVisited) { - CPDF_Object* pBaseCS = pArray->GetDirectObjectAt(1); + const CPDF_Array* pArray, + std::set<const CPDF_Object*>* pVisited) { + const CPDF_Object* pBaseCS = pArray->GetDirectObjectAt(1); if (pBaseCS == m_pArray) return 0; |