From 92549cd7502296328aecef23dab6d7fc0e847645 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 16 Nov 2016 07:32:48 -0800 Subject: Continue nit cleanup in fwl/core Review-Url: https://codereview.chromium.org/2506493003 --- xfa/fwl/core/cfwl_widget.cpp | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'xfa/fwl/core/cfwl_widget.cpp') diff --git a/xfa/fwl/core/cfwl_widget.cpp b/xfa/fwl/core/cfwl_widget.cpp index fb44ded269..7cd2ca3913 100644 --- a/xfa/fwl/core/cfwl_widget.cpp +++ b/xfa/fwl/core/cfwl_widget.cpp @@ -27,14 +27,6 @@ void CFWL_Widget::Initialize() { m_pIface->SetAssociateWidget(this); } -IFWL_Widget* CFWL_Widget::GetWidget() { - return m_pIface.get(); -} - -const IFWL_Widget* CFWL_Widget::GetWidget() const { - return m_pIface.get(); -} - void CFWL_Widget::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { if (m_pIface) m_pIface->GetWidgetRect(rect, bAutoSize); @@ -52,9 +44,7 @@ void CFWL_Widget::ModifyStyles(uint32_t dwStylesAdded, } uint32_t CFWL_Widget::GetStylesEx() { - if (!m_pIface) - return 0; - return m_pIface->GetStylesEx(); + return m_pIface ? m_pIface->GetStylesEx() : 0; } void CFWL_Widget::ModifyStylesEx(uint32_t dwStylesExAdded, @@ -77,21 +67,18 @@ void CFWL_Widget::SetLayoutItem(void* pItem) { } void CFWL_Widget::Update() { - if (!m_pIface) - return; - m_pIface->Update(); + if (m_pIface) + m_pIface->Update(); } void CFWL_Widget::LockUpdate() { - if (!m_pIface) - return; - m_pIface->LockUpdate(); + if (m_pIface) + m_pIface->LockUpdate(); } void CFWL_Widget::UnlockUpdate() { - if (!m_pIface) - return; - m_pIface->UnlockUpdate(); + if (m_pIface) + m_pIface->UnlockUpdate(); } FWL_WidgetHit CFWL_Widget::HitTest(FX_FLOAT fx, FX_FLOAT fy) { -- cgit v1.2.3