From e4f2f4a3f4fd3e9f372912f4151d7c7843f9556f Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 15 Oct 2018 18:51:11 +0000 Subject: Use more UnownedPtr in CPDF_FormControl. To make this work, remove an UnownedPtr vector in CPDF_FormField and make CPDF_InteractiveForm manage it instead. Also simplify some code within CPDF_FormControl and CPDF_InteractiveForm. Change-Id: Ifc3a979dcdb992376a48db7a40840d2e76078500 Reviewed-on: https://pdfium-review.googlesource.com/c/43938 Commit-Queue: Lei Zhang Reviewed-by: Tom Sepez --- core/fpdfdoc/cpdf_formcontrol.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fpdfdoc/cpdf_formcontrol.h') diff --git a/core/fpdfdoc/cpdf_formcontrol.h b/core/fpdfdoc/cpdf_formcontrol.h index 7288651a73..d66ae0ab6f 100644 --- a/core/fpdfdoc/cpdf_formcontrol.h +++ b/core/fpdfdoc/cpdf_formcontrol.h @@ -48,7 +48,7 @@ class CPDF_FormControl { const CPDF_InteractiveForm* GetInteractiveForm() const { return m_pForm.Get(); } - CPDF_FormField* GetField() const { return m_pField; } + CPDF_FormField* GetField() const { return m_pField.Get(); } CPDF_Dictionary* GetWidget() const { return m_pWidgetDict.Get(); } CFX_FloatRect GetRect() const; @@ -115,7 +115,7 @@ class CPDF_FormControl { CPDF_Stream* GetIcon(const ByteString& csEntry); CPDF_ApSettings GetMK() const; - CPDF_FormField* const m_pField; + UnownedPtr const m_pField; UnownedPtr const m_pWidgetDict; UnownedPtr const m_pForm; }; -- cgit v1.2.3