From 2a38a02b0492de0576c2e5b5e7d550f969367f9d Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 20 Oct 2016 07:07:48 -0700 Subject: Remove IFWL_*::Create methods, use new The create methods just proxied to the constructor. Remove Creates and call new directly where needed. Review-Url: https://chromiumcodereview.appspot.com/2433133002 --- xfa/fwl/core/ifwl_edit.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'xfa/fwl/core/ifwl_edit.cpp') diff --git a/xfa/fwl/core/ifwl_edit.cpp b/xfa/fwl/core/ifwl_edit.cpp index 83c00627c3..189df97c89 100644 --- a/xfa/fwl/core/ifwl_edit.cpp +++ b/xfa/fwl/core/ifwl_edit.cpp @@ -51,12 +51,6 @@ void AddSquigglyPath(CFX_Path* pPathData, } // namespace -// static -IFWL_Edit* IFWL_Edit::Create(const CFWL_WidgetImpProperties& properties, - IFWL_Widget* pOuter) { - return new IFWL_Edit(properties, pOuter); -} - IFWL_Edit::IFWL_Edit(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter) : IFWL_Widget(properties, pOuter), @@ -1482,7 +1476,7 @@ void IFWL_Edit::InitScrollBar(FX_BOOL bVert) { prop.m_dwStates = FWL_WGTSTATE_Disabled | FWL_WGTSTATE_Invisible; prop.m_pParent = this; prop.m_pThemeProvider = m_pProperties->m_pThemeProvider; - IFWL_ScrollBar* pScrollBar = IFWL_ScrollBar::Create(prop, this); + IFWL_ScrollBar* pScrollBar = new IFWL_ScrollBar(prop, this); pScrollBar->Initialize(); (bVert ? &m_pVertScrollBar : &m_pHorzScrollBar)->reset(pScrollBar); } @@ -1580,7 +1574,7 @@ void IFWL_Edit::InitCaret() { if (!m_pCaret) { if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_InnerCaret)) { CFWL_WidgetImpProperties prop; - m_pCaret.reset(IFWL_Caret::Create(prop, this)); + m_pCaret.reset(new IFWL_Caret(prop, this)); m_pCaret->Initialize(); m_pCaret->SetParent(this); m_pCaret->SetStates(m_pProperties->m_dwStates); -- cgit v1.2.3