From 5a6c1398d0e559fb6a048cb0dca46ba9f9309a77 Mon Sep 17 00:00:00 2001 From: weili Date: Mon, 11 Jul 2016 14:43:40 -0700 Subject: Use smart pointers for class owned member variables Replace raw member variables to smart pointer type to better maintain the ownership and to ease the management. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2136683002 --- core/fpdfdoc/include/fpdf_doc.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core/fpdfdoc/include') diff --git a/core/fpdfdoc/include/fpdf_doc.h b/core/fpdfdoc/include/fpdf_doc.h index afa5a30b18..be52a1b829 100644 --- a/core/fpdfdoc/include/fpdf_doc.h +++ b/core/fpdfdoc/include/fpdf_doc.h @@ -374,8 +374,10 @@ class CPDF_AnnotList { CPDF_RenderOptions* pOptions, FX_RECT* pClipRect); size_t Count() const { return m_AnnotList.size(); } - CPDF_Annot* GetAt(size_t index) const { return m_AnnotList[index]; } - const std::vector& All() const { return m_AnnotList; } + CPDF_Annot* GetAt(size_t index) const { return m_AnnotList[index].get(); } + const std::vector>& All() const { + return m_AnnotList; + } CPDF_Document* GetDocument() const { return m_pDocument; } protected: @@ -389,7 +391,7 @@ class CPDF_AnnotList { FX_RECT* clip_rect); CPDF_Document* const m_pDocument; - std::vector m_AnnotList; + std::vector> m_AnnotList; }; #define COLORTYPE_TRANSPARENT 0 -- cgit v1.2.3