diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-24 14:58:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-30 08:38:57 +0200 |
commit | af73d613118bb141a51e56e4c8da405cc3e1298f (patch) | |
tree | eda854e0f454bbaa65b8ecad65e8ffd61a96ee67 /svtools | |
parent | db41d66179916146411cd2483460d7ab4ba7e6c4 (diff) |
loplugin:useuniqueptr in SvxIconChoiceCtrl_Impl
Change-Id: I01524abe1059e79a77c54c8b00c7f43a8575283f
Reviewed-on: https://gerrit.libreoffice.org/53600
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/imivctl.hxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index 12e574e345f9..f519d4cdc452 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -173,7 +173,7 @@ class SvxIconChoiceCtrl_Impl long nMaxVirtWidth; // max. width aVirtOutputSize for ALIGN_TOP long nMaxVirtHeight; // max. height aVirtOutputSize for ALIGN_LEFT std::unique_ptr<SvxIconChoiceCtrlEntryList_impl> pZOrderList; - SvxIconChoiceCtrlColumnInfoMap* m_pColumns; + std::unique_ptr<SvxIconChoiceCtrlColumnInfoMap> m_pColumns; VclPtr<IcnViewEdit_Impl> pEdit; WinBits nWinBits; long nMaxBoundHeight; // height of highest BoundRects diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 48c65c97deb6..46f68017fad2 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -3294,17 +3294,13 @@ bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) void SvxIconChoiceCtrl_Impl::ClearColumnList() { - if (!m_pColumns) - return; - - m_pColumns->clear(); - DELETEZ(m_pColumns); + m_pColumns.reset(); } void SvxIconChoiceCtrl_Impl::SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& rInfo) { if (!m_pColumns) - m_pColumns = new SvxIconChoiceCtrlColumnInfoMap; + m_pColumns.reset(new SvxIconChoiceCtrlColumnInfoMap); SvxIconChoiceCtrlColumnInfo* pInfo = new SvxIconChoiceCtrlColumnInfo( rInfo ); m_pColumns->insert(std::make_pair(nIndex, std::unique_ptr<SvxIconChoiceCtrlColumnInfo>(pInfo))); |