[Libreoffice-commits] core.git: include/svl svl/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 16 08:25:49 UTC 2021


 include/svl/itemset.hxx      |    1 -
 svl/source/items/itemset.cxx |   26 --------------------------
 2 files changed, 27 deletions(-)

New commits:
commit 476d8b4088b723df883a8d33d018da68c6b03933
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Jul 16 08:56:29 2021 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Jul 16 10:25:13 2021 +0200

    Drop unused ctor
    
    Change-Id: I5144d23d4e6f8e01035ef88a222f609184043c6a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119005
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx
index 4ca99faa13e8..befae1012990 100644
--- a/include/svl/itemset.hxx
+++ b/include/svl/itemset.hxx
@@ -108,7 +108,6 @@ private:
 
     SfxItemSet( SfxItemPool & pool, const WhichRangesContainer& wids, std::size_t items );
     SfxItemSet( SfxItemPool & pool, WhichRangesContainer&& wids, std::size_t items );
-    SfxItemSet( SfxItemPool & pool, std::initializer_list<sal_uInt16> wids, std::size_t items );
 
 public:
     SfxPoolItem const**         GetItems_Impl() const { return m_pItems.get(); }
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 59c640bb6c5d..f96d0c9c8ef1 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -55,32 +55,6 @@ SfxItemSet::SfxItemSet(SfxItemPool& rPool)
     m_pItems.reset(new const SfxPoolItem*[nSize]{});
 }
 
-SfxItemSet::SfxItemSet(
-    SfxItemPool & pool, std::initializer_list<sal_uInt16> wids,
-    std::size_t items):
-    m_pPool(&pool), m_pParent(nullptr),
-    m_pItems(new SfxPoolItem const *[items]{}),
-        // cannot overflow, assuming std::size_t is no smaller than sal_uInt16,
-        // as wids.size() must be substantially smaller than
-        // std::numeric_limits<sal_uInt16>::max() by construction in
-        // SfxItemSet::create
-    m_nCount(0)
-{
-    assert(wids.size() != 0);
-    assert(wids.size() % 2 == 0);
-    std::unique_ptr<WhichPair[]> xPairs = std::make_unique<WhichPair[]>(wids.size()/2);
-    std::size_t i = 0;
-    for (auto it = wids.begin(); it != wids.end(); ) {
-        sal_uInt16 nStart = *it;
-        ++it;
-        sal_uInt16 nEnd = *it;
-        ++it;
-        xPairs[i++] = { nStart, nEnd };
-    }
-    m_pWhichRanges = WhichRangesContainer(std::move(xPairs), wids.size()/2);
-    assert(svl::detail::validRanges2(m_pWhichRanges));
-}
-
 SfxItemSet::SfxItemSet( SfxItemPool& rPool, SfxAllItemSetFlag )
     : m_pPool(&rPool)
     , m_pParent(nullptr)


More information about the Libreoffice-commits mailing list