From 797ca5cad52edde7c65da45a15216f20b1bfd8fd Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 25 May 2017 12:03:18 -0700 Subject: Mass conversion of all const-lifetime class members Sed + minimal conversions to compile, including moving some constructors into the .cpp file. Any that caused ASAN issues during the tests were omitted rather than trying to resolve the underlying issue. Change-Id: I00a421f33b253eb4071ffd9af3f2922c7443b335 Reviewed-on: https://pdfium-review.googlesource.com/5891 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- xfa/fwl/cfwl_combobox.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'xfa/fwl/cfwl_combobox.cpp') diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp index b5931d1c04..ba72d3d2b2 100644 --- a/xfa/fwl/cfwl_combobox.cpp +++ b/xfa/fwl/cfwl_combobox.cpp @@ -49,12 +49,12 @@ CFWL_ComboBox::CFWL_ComboBox(const CFWL_App* app) auto prop = pdfium::MakeUnique(); prop->m_pThemeProvider = m_pProperties->m_pThemeProvider; prop->m_dwStyles |= FWL_WGTSTYLE_Border | FWL_WGTSTYLE_VScroll; - m_pListBox = - pdfium::MakeUnique(m_pOwnerApp, std::move(prop), this); + m_pListBox = pdfium::MakeUnique(m_pOwnerApp.Get(), + std::move(prop), this); if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_DropDown) && !m_pEdit) { m_pEdit = pdfium::MakeUnique( - m_pOwnerApp, pdfium::MakeUnique(), this); + m_pOwnerApp.Get(), pdfium::MakeUnique(), this); m_pEdit->SetOuter(this); } if (m_pEdit) @@ -92,7 +92,8 @@ void CFWL_ComboBox::ModifyStylesEx(uint32_t dwStylesExAdded, bool bRemoveDropDown = !!(dwStylesExRemoved & FWL_STYLEEXT_CMB_DropDown); if (bAddDropDown && !m_pEdit) { m_pEdit = pdfium::MakeUnique( - m_pOwnerApp, pdfium::MakeUnique(), nullptr); + m_pOwnerApp.Get(), pdfium::MakeUnique(), + nullptr); m_pEdit->SetOuter(this); m_pEdit->SetParent(this); } else if (bRemoveDropDown && m_pEdit) { @@ -496,8 +497,8 @@ void CFWL_ComboBox::InitProxyForm() { // TODO(dsinclair): Does this leak? I don't see a delete, but I'm not sure // if the SetParent call is going to transfer ownership. - m_pComboBoxProxy = new CFWL_ComboBoxProxy(this, m_pOwnerApp, std::move(prop), - m_pListBox.get()); + m_pComboBoxProxy = new CFWL_ComboBoxProxy(this, m_pOwnerApp.Get(), + std::move(prop), m_pListBox.get()); m_pListBox->SetParent(m_pComboBoxProxy); } @@ -510,8 +511,8 @@ void CFWL_ComboBox::DisForm_InitComboList() { prop->m_dwStyles = FWL_WGTSTYLE_Border | FWL_WGTSTYLE_VScroll; prop->m_dwStates = FWL_WGTSTATE_Invisible; prop->m_pThemeProvider = m_pProperties->m_pThemeProvider; - m_pListBox = - pdfium::MakeUnique(m_pOwnerApp, std::move(prop), this); + m_pListBox = pdfium::MakeUnique(m_pOwnerApp.Get(), + std::move(prop), this); } void CFWL_ComboBox::DisForm_InitComboEdit() { @@ -522,8 +523,8 @@ void CFWL_ComboBox::DisForm_InitComboEdit() { prop->m_pParent = this; prop->m_pThemeProvider = m_pProperties->m_pThemeProvider; - m_pEdit = - pdfium::MakeUnique(m_pOwnerApp, std::move(prop), this); + m_pEdit = pdfium::MakeUnique(m_pOwnerApp.Get(), + std::move(prop), this); m_pEdit->SetOuter(this); } -- cgit v1.2.3