summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_shadingpattern.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-26 18:42:28 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-26 18:42:28 +0000
commit0a6dbeffbc61f2140b1b845f6791c1b15b34cbd7 (patch)
tree7f17e935721f2e9752d2b80fe4cdcbb4f8eb79ba /core/fpdfapi/page/cpdf_shadingpattern.h
parent785da23f6cce8004b8e7759345abd877dab953ea (diff)
downloadpdfium-0a6dbeffbc61f2140b1b845f6791c1b15b34cbd7.tar.xz
Add some more consts to unowned pointers.
Ideally, unowned ptrs might well be const, as updating something through an unowned reference is best avoided. Change-Id: Ida8111ffe0ee1e30bbf6b7718b0929dfb5cafdff Reviewed-on: https://pdfium-review.googlesource.com/36050 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_shadingpattern.h')
-rw-r--r--core/fpdfapi/page/cpdf_shadingpattern.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/page/cpdf_shadingpattern.h b/core/fpdfapi/page/cpdf_shadingpattern.h
index 3c68c818ea..d7aa1cb272 100644
--- a/core/fpdfapi/page/cpdf_shadingpattern.h
+++ b/core/fpdfapi/page/cpdf_shadingpattern.h
@@ -55,7 +55,7 @@ class CPDF_ShadingPattern : public CPDF_Pattern {
ShadingType GetShadingType() const { return m_ShadingType; }
bool IsShadingObject() const { return m_bShadingObj; }
const CPDF_Object* GetShadingObject() const { return m_pShadingObj.Get(); }
- CPDF_ColorSpace* GetCS() const { return m_pCS.Get(); }
+ const CPDF_ColorSpace* GetCS() const { return m_pCS.Get(); }
const std::vector<std::unique_ptr<CPDF_Function>>& GetFuncs() const {
return m_pFunctions;
}
@@ -73,9 +73,9 @@ class CPDF_ShadingPattern : public CPDF_Pattern {
// Still keep |m_pCS| as some CPDF_ColorSpace (name object) are not managed
// as counted objects. Refer to CPDF_DocPageData::GetColorSpace.
- UnownedPtr<CPDF_ColorSpace> m_pCS;
+ UnownedPtr<const CPDF_ColorSpace> m_pCS;
- UnownedPtr<CPDF_CountedColorSpace> m_pCountedCS;
+ UnownedPtr<const CPDF_CountedColorSpace> m_pCountedCS;
std::vector<std::unique_ptr<CPDF_Function>> m_pFunctions;
};