diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-22 15:15:30 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-22 23:44:01 +0000 |
commit | 4cb82ee95256f110489f2b503e70729c44419e74 (patch) | |
tree | 56d11efe9bd8e93af2145c02f4f3c84ea3954f55 /core/fpdfapi/page/cpdf_shadingpattern.h | |
parent | 355954b8f09a65934b95dd6ca1299a73ae5e24b2 (diff) | |
download | pdfium-4cb82ee95256f110489f2b503e70729c44419e74.tar.xz |
Convert more c-style pointers to CFX_UnownedPtr
Change-Id: I551b4210c95db0b916e9fe6cddf11e6c3d015c50
Reviewed-on: https://pdfium-review.googlesource.com/5790
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.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_shadingpattern.h b/core/fpdfapi/page/cpdf_shadingpattern.h index 136153d4a0..c2d55cc3d5 100644 --- a/core/fpdfapi/page/cpdf_shadingpattern.h +++ b/core/fpdfapi/page/cpdf_shadingpattern.h @@ -12,6 +12,7 @@ #include "core/fpdfapi/page/cpdf_countedobject.h" #include "core/fpdfapi/page/cpdf_pattern.h" +#include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/fx_system.h" enum ShadingType { @@ -53,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; } + CPDF_Object* GetShadingObject() const { return m_pShadingObj.Get(); } CPDF_ColorSpace* GetCS() const { return m_pCS; } const std::vector<std::unique_ptr<CPDF_Function>>& GetFuncs() const { return m_pFunctions; @@ -62,7 +63,7 @@ class CPDF_ShadingPattern : public CPDF_Pattern { private: ShadingType m_ShadingType; bool m_bShadingObj; - CPDF_Object* m_pShadingObj; + CFX_UnownedPtr<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. |