From d1ae2387c729ac8a0e616c57075174eb0d06d389 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 11 Apr 2018 12:09:57 +0200 Subject: make FontList::Clone return a std::unique_ptr and simplify the logic in SvxCharNamePage Change-Id: Ic1b379bb83203aa1ebf47b44d944c83a02c04224 Reviewed-on: https://gerrit.libreoffice.org/52744 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svtools/source/control/ctrltool.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'svtools') diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index ad0e038dacc9..993a0ffb8b30 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -381,10 +381,9 @@ FontList::~FontList() } } -FontList* FontList::Clone() const +std::unique_ptr FontList::Clone() const { - FontList* pReturn = new FontList(mpDev, mpDev2); - return pReturn; + return std::unique_ptr(new FontList(mpDev, mpDev2)); } const OUString& FontList::GetStyleName(FontWeight eWeight, FontItalic eItalic) const -- cgit