svl/source/items/itemset.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit c71e26b4cf6181791acff4017f661edb3523c70e Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Jun 29 10:06:04 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Jun 29 13:03:40 2022 +0200 elide unnecessary copy in SfxItemSet constructor Change-Id: I6881f5dcea753a6d2cfbf203b50043219191fae4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136601 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 50af12fee107..93721dd756f2 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -97,8 +97,14 @@ SfxItemSet::SfxItemSet(SfxItemPool& pool, const WhichRangesContainer& wids) } SfxItemSet::SfxItemSet(SfxItemPool& pool, WhichRangesContainer&& wids) - : SfxItemSet(pool, wids, svl::detail::CountRanges(wids)) + : m_pPool(&pool), m_pParent(nullptr), + m_ppItems(new SfxPoolItem const *[svl::detail::CountRanges(wids)]{}), + m_pWhichRanges(std::move(wids)), + m_nCount(0), + m_bItemsFixed(false) { + assert(svl::detail::CountRanges(m_pWhichRanges) != 0); + assert(svl::detail::validRanges2(m_pWhichRanges)); } SfxItemSet::SfxItemSet( const SfxItemSet& rASet )