summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_shadingpattern.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-25 16:24:48 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-25 16:24:48 +0000
commit710fa99b0bd26e6761c4481b4b9b6d26d2954c3e (patch)
tree0c744f3485faa3a91779286dd0f5ef9c0ac26337 /core/fpdfapi/page/cpdf_shadingpattern.h
parentcbf1550e48e300142a53f635daba3c1d8910add9 (diff)
downloadpdfium-710fa99b0bd26e6761c4481b4b9b6d26d2954c3e.tar.xz
Mark CPDF_Object pointers in pattern code as const.
Change-Id: Id7bf252ebe25c92d26065d1138a445ebb2f78d0b Reviewed-on: https://pdfium-review.googlesource.com/32187 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_shadingpattern.h')
-rw-r--r--core/fpdfapi/page/cpdf_shadingpattern.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_shadingpattern.h b/core/fpdfapi/page/cpdf_shadingpattern.h
index bb633f9a4d..3c68c818ea 100644
--- a/core/fpdfapi/page/cpdf_shadingpattern.h
+++ b/core/fpdfapi/page/cpdf_shadingpattern.h
@@ -54,7 +54,7 @@ class CPDF_ShadingPattern : public CPDF_Pattern {
ShadingType GetShadingType() const { return m_ShadingType; }
bool IsShadingObject() const { return m_bShadingObj; }
- CPDF_Object* GetShadingObject() const { return m_pShadingObj.Get(); }
+ const CPDF_Object* GetShadingObject() const { return m_pShadingObj.Get(); }
CPDF_ColorSpace* GetCS() const { return m_pCS.Get(); }
const std::vector<std::unique_ptr<CPDF_Function>>& GetFuncs() const {
return m_pFunctions;
@@ -69,7 +69,7 @@ class CPDF_ShadingPattern : public CPDF_Pattern {
ShadingType m_ShadingType = kInvalidShading;
const bool m_bShadingObj;
- UnownedPtr<CPDF_Object> m_pShadingObj;
+ UnownedPtr<const CPDF_Object> m_pShadingObj;
// Still keep |m_pCS| as some CPDF_ColorSpace (name object) are not managed
// as counted objects. Refer to CPDF_DocPageData::GetColorSpace.