summaryrefslogtreecommitdiff
path: root/svl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-18 10:12:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-18 12:01:00 +0200
commita6535669f9532b61ee5906d4b1339bc9af4b0882 (patch)
tree669d55c93400ff2dce49ee1953f47e6d496518bf /svl/source
parentf0454fe3bb5f8b589cc994203060a94d5cdad0a4 (diff)
use more pass-by-value in SfxItemSet
which avoids some copying Change-Id: Id774c8947d0c2676425a1a192e0ac28c8f8402db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138468 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source')
-rw-r--r--svl/source/items/itemset.cxx24
1 files changed, 3 insertions, 21 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 93721dd756f2..4894e85a6a06 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -77,27 +77,9 @@ SfxItemSet::SfxItemSet( SfxItemPool& rPool, WhichRangesContainer&& ranges, SfxPo
assert(svl::detail::validRanges2(m_pWhichRanges));
}
-SfxItemSet::SfxItemSet(
- SfxItemPool & pool,
- const WhichRangesContainer& wids,
- std::size_t items):
- m_pPool(&pool), m_pParent(nullptr),
- m_ppItems(new SfxPoolItem const *[items]{}),
- m_pWhichRanges(wids),
- m_nCount(0),
- m_bItemsFixed(false)
-{
- assert(wids.size() != 0);
- assert(svl::detail::validRanges2(m_pWhichRanges));
-}
-
-SfxItemSet::SfxItemSet(SfxItemPool& pool, const WhichRangesContainer& wids)
- : SfxItemSet(pool, wids, svl::detail::CountRanges(wids))
-{
-}
-
-SfxItemSet::SfxItemSet(SfxItemPool& pool, WhichRangesContainer&& wids)
- : m_pPool(&pool), m_pParent(nullptr),
+SfxItemSet::SfxItemSet(SfxItemPool& pool, WhichRangesContainer wids)
+ : m_pPool(&pool),
+ m_pParent(nullptr),
m_ppItems(new SfxPoolItem const *[svl::detail::CountRanges(wids)]{}),
m_pWhichRanges(std::move(wids)),
m_nCount(0),