From 6fe8795d9022105a0061a0a81be9a49d49fda345 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 1 Nov 2016 18:48:19 -0700 Subject: Fold IFWL*::{Initialize|Finalize} into constructor/destructor This Cl moves the ::Initialize method into the constructors and the ::Finalize method into the destructors. The |m_pDelegate| is made private and a unique_ptr. A |SetDelegate| and |GetDelegate| method are added. Review-Url: https://codereview.chromium.org/2464703006 --- xfa/fwl/core/fwl_noteimp.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'xfa/fwl/core/fwl_noteimp.cpp') diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp index 22579571d4..2ca34f9619 100644 --- a/xfa/fwl/core/fwl_noteimp.cpp +++ b/xfa/fwl/core/fwl_noteimp.cpp @@ -760,15 +760,9 @@ FX_BOOL CFWL_EventTarget::IsFilterEvent(CFWL_Event* pEvent, uint32_t dwFilter) { CFWL_ToolTipContainer* CFWL_ToolTipContainer::s_pInstance = nullptr; CFWL_ToolTipContainer::CFWL_ToolTipContainer() - : m_pToolTipImp(nullptr), m_pToolTipDp(new CFWL_CoreToolTipDP(0, 2000)) {} + : m_pToolTipDp(new CFWL_CoreToolTipDP(0, 2000)) {} -CFWL_ToolTipContainer::~CFWL_ToolTipContainer() { - if (m_pToolTipImp) { - IFWL_ToolTip* pToolTip = static_cast(m_pToolTipImp); - pToolTip->Finalize(); - delete pToolTip; - } -} +CFWL_ToolTipContainer::~CFWL_ToolTipContainer() {} // static CFWL_ToolTipContainer* CFWL_ToolTipContainer::getInstance() { -- cgit v1.2.3