From d4dff7dc148080da437ed2e46cd08ded044e64a7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 25 Oct 2018 12:21:25 +0200 Subject: return std::unique_ptr from CloneSetWhich Change-Id: I709122cb8cd7c257e7eb2bd564c529689e6d555a Reviewed-on: https://gerrit.libreoffice.org/62350 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svl/source/items/poolitem.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'svl') diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx index 5fe5c480ff07..40e9ef895d42 100644 --- a/svl/source/items/poolitem.cxx +++ b/svl/source/items/poolitem.cxx @@ -127,11 +127,11 @@ void SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const xmlTextWriterEndElement(pWriter); } -SfxPoolItem* SfxPoolItem::CloneSetWhich( sal_uInt16 nNewWhich ) const +std::unique_ptr SfxPoolItem::CloneSetWhich( sal_uInt16 nNewWhich ) const { SfxPoolItem* pItem = Clone(); pItem->SetWhich(nNewWhich); - return pItem; + return std::unique_ptr(pItem); } bool SfxPoolItem::IsVoidItem() const -- cgit