From 979293ca138ccfb22ff1282b9055ae18b775fed8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 24 Apr 2018 13:42:15 +0200 Subject: loplugin:useuniqueptr in FontNameBox Change-Id: Icb362d46b34010dbfc97014d76a364b720c73b02 Reviewed-on: https://gerrit.libreoffice.org/53595 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svtools/source/control/ctrlbox.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'svtools') diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 82cd893e9710..5704f3e9d977 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -669,7 +669,6 @@ void LineListBox::DataChanged( const DataChangedEvent& rDCEvt ) FontNameBox::FontNameBox( vcl::Window* pParent, WinBits nWinStyle ) : ComboBox( pParent, nWinStyle ) { - mpFontList = nullptr; mbWYSIWYG = false; InitFontMRUEntriesFile(); } @@ -759,8 +758,7 @@ void FontNameBox::InitFontMRUEntriesFile() void FontNameBox::ImplDestroyFontList() { - delete mpFontList; - mpFontList = nullptr; + mpFontList.reset(); } void FontNameBox::Fill( const FontList* pList ) @@ -772,7 +770,7 @@ void FontNameBox::Fill( const FontList* pList ) Clear(); ImplDestroyFontList(); - mpFontList = new ImplFontList; + mpFontList.reset(new ImplFontList); // insert fonts sal_uInt16 nFontCount = pList->GetFontNameCount(); -- cgit v1.2.3