From 01de216daf6dda0fb809bfa1919fcd13e6953ee9 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 12 Jun 2021 01:16:36 +0200 Subject: Current baseline Clang 5.0.2 is able to upcast std::unique_ptr Change-Id: I5ede872a6a629be1bcbd4d3e6fbd604cc76f1d77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116911 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- svl/source/items/itemset.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'svl') diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index b234543a28f4..9ae951ab5936 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -1771,7 +1771,7 @@ std::unique_ptr SfxAllItemSet::Clone(bool bItems, SfxItemPool *pToPo std::unique_ptr pNewSet(new SfxAllItemSet( *pToPool )); if ( bItems ) pNewSet->Set( *this ); - return std::unique_ptr(pNewSet.release()); // clang3.8 does not seem to be able to upcast std::unique_ptr + return std::move(pNewSet); } else return std::unique_ptr(bItems ? new SfxAllItemSet(*this) : new SfxAllItemSet(*m_pPool)); -- cgit