From 4734512572776f8fc705e28fba8a46d981372e99 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 24 May 2017 14:07:18 -0700 Subject: Convert to CFX_UnownedPtr, part 8 Change-Id: I99d6b4df72e369652301c36e4046f03ef95ed07d Reviewed-on: https://pdfium-review.googlesource.com/5837 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- core/fpdfapi/page/cpdf_image.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core/fpdfapi/page/cpdf_image.h') diff --git a/core/fpdfapi/page/cpdf_image.h b/core/fpdfapi/page/cpdf_image.h index 7b7e090b49..c09ce1a46d 100644 --- a/core/fpdfapi/page/cpdf_image.h +++ b/core/fpdfapi/page/cpdf_image.h @@ -12,6 +12,7 @@ #include "core/fpdfapi/parser/cpdf_stream.h" #include "core/fxcrt/cfx_maybe_owned.h" #include "core/fxcrt/cfx_retain_ptr.h" +#include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/fx_system.h" class CFX_DIBSource; @@ -33,8 +34,8 @@ class CPDF_Image : public CFX_Retainable { CPDF_Dictionary* GetDict() const { return m_pStream ? m_pStream->GetDict() : nullptr; } - CPDF_Dictionary* GetOC() const { return m_pOC; } - CPDF_Document* GetDocument() const { return m_pDocument; } + CPDF_Dictionary* GetOC() const { return m_pOC.Get(); } + CPDF_Document* GetDocument() const { return m_pDocument.Get(); } int32_t GetPixelHeight() const { return m_Height; } int32_t GetPixelWidth() const { return m_Width; } @@ -78,10 +79,10 @@ class CPDF_Image : public CFX_Retainable { bool m_bIsInline = false; bool m_bIsMask = false; bool m_bInterpolate = false; - CPDF_Document* const m_pDocument; + CFX_UnownedPtr const m_pDocument; CFX_MaybeOwned m_pStream; CFX_MaybeOwned m_pDict; - CPDF_Dictionary* m_pOC = nullptr; + CFX_UnownedPtr m_pOC; }; #endif // CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ -- cgit v1.2.3