diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-25 12:03:18 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-25 19:16:31 +0000 |
commit | 797ca5cad52edde7c65da45a15216f20b1bfd8fd (patch) | |
tree | 811a96d5f505e7cff89395cea7dff89604fc9133 /xfa/fwl/cfwl_combobox.cpp | |
parent | 3a4c408554f2f2ffb5a143f6dadcdd528fcf106e (diff) | |
download | pdfium-797ca5cad52edde7c65da45a15216f20b1bfd8fd.tar.xz |
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 <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_combobox.cpp')
-rw-r--r-- | xfa/fwl/cfwl_combobox.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
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<CFWL_WidgetProperties>(); prop->m_pThemeProvider = m_pProperties->m_pThemeProvider; prop->m_dwStyles |= FWL_WGTSTYLE_Border | FWL_WGTSTYLE_VScroll; - m_pListBox = - pdfium::MakeUnique<CFWL_ComboList>(m_pOwnerApp, std::move(prop), this); + m_pListBox = pdfium::MakeUnique<CFWL_ComboList>(m_pOwnerApp.Get(), + std::move(prop), this); if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_DropDown) && !m_pEdit) { m_pEdit = pdfium::MakeUnique<CFWL_ComboEdit>( - m_pOwnerApp, pdfium::MakeUnique<CFWL_WidgetProperties>(), this); + m_pOwnerApp.Get(), pdfium::MakeUnique<CFWL_WidgetProperties>(), 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<CFWL_ComboEdit>( - m_pOwnerApp, pdfium::MakeUnique<CFWL_WidgetProperties>(), nullptr); + m_pOwnerApp.Get(), pdfium::MakeUnique<CFWL_WidgetProperties>(), + 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<CFWL_ComboList>(m_pOwnerApp, std::move(prop), this); + m_pListBox = pdfium::MakeUnique<CFWL_ComboList>(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<CFWL_ComboEdit>(m_pOwnerApp, std::move(prop), this); + m_pEdit = pdfium::MakeUnique<CFWL_ComboEdit>(m_pOwnerApp.Get(), + std::move(prop), this); m_pEdit->SetOuter(this); } |