From 3c5d5d8ae3dfb876386e434257b5b3a81cb96c07 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 10 May 2024 08:57:07 +0200 Subject: no need to convert from Sequence to std::set here we are never actually going to need a set, so just iterate over the Sequence Change-Id: I0de6ff9e0661227a69b7fbe6cccc5268f9eba58f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167430 Tested-by: Jenkins Reviewed-by: Noel Grandin --- configmgr/source/components.cxx | 4 ++-- configmgr/source/components.hxx | 4 ++-- configmgr/source/partial.cxx | 5 +++-- configmgr/source/partial.hxx | 4 ++-- configmgr/source/update.cxx | 8 +------- 5 files changed, 10 insertions(+), 15 deletions(-) (limited to 'configmgr') diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index 7c6f6f2d79fc..8afaaff3bae8 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -389,8 +389,8 @@ void Components::removeExtensionXcuFile( void Components::insertModificationXcuFile( OUString const & fileUri, - std::set< OUString > const & includedPaths, - std::set< OUString > const & excludedPaths, + css::uno::Sequence< OUString > const & includedPaths, + css::uno::Sequence< OUString > const & excludedPaths, Modifications * modifications) { assert(modifications != nullptr); diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx index 5d7b6b5967ee..8f5bd24c8925 100644 --- a/configmgr/source/components.hxx +++ b/configmgr/source/components.hxx @@ -91,8 +91,8 @@ public: void insertModificationXcuFile( OUString const & fileUri, - std::set< OUString > const & includedPaths, - std::set< OUString > const & excludedPaths, + css::uno::Sequence< OUString > const & includedPaths, + css::uno::Sequence< OUString > const & excludedPaths, Modifications * modifications); css::beans::Optional< css::uno::Any > diff --git a/configmgr/source/partial.cxx b/configmgr/source/partial.cxx index f31e98549684..89643cb7ceb9 100644 --- a/configmgr/source/partial.cxx +++ b/configmgr/source/partial.cxx @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -56,8 +57,8 @@ bool parseSegment( } Partial::Partial( - std::set< OUString > const & includedPaths, - std::set< OUString > const & excludedPaths) + css::uno::Sequence< OUString > const & includedPaths, + css::uno::Sequence< OUString > const & excludedPaths) { // The Partial::Node tree built up here encodes the following information: // * Inner node, startInclude: an include starts here that contains excluded diff --git a/configmgr/source/partial.hxx b/configmgr/source/partial.hxx index 265c70124177..028fc339fae1 100644 --- a/configmgr/source/partial.hxx +++ b/configmgr/source/partial.hxx @@ -33,8 +33,8 @@ public: enum Containment { CONTAINS_NOT, CONTAINS_SUBNODES, CONTAINS_NODE }; Partial( - std::set< OUString > const & includedPaths, - std::set< OUString > const & excludedPaths); + css::uno::Sequence< OUString > const & includedPaths, + css::uno::Sequence< OUString > const & excludedPaths); ~Partial(); diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx index 1df4cbdd7aa5..9b38cc873dcf 100644 --- a/configmgr/source/update.cxx +++ b/configmgr/source/update.cxx @@ -45,12 +45,6 @@ namespace configmgr::update { namespace { -std::set< OUString > seqToSet( - css::uno::Sequence< OUString > const & sequence) -{ - return std::set< OUString >( sequence.begin(), sequence.end() ); -} - class Service: public cppu::WeakImplHelper< css::configuration::XUpdate, css::lang::XServiceInfo > { @@ -144,7 +138,7 @@ void Service::insertModificationXcuFile( Components & components = Components::getSingleton(context_); Modifications mods; components.insertModificationXcuFile( - fileUri, seqToSet(includedPaths), seqToSet(excludedPaths), &mods); + fileUri, includedPaths, excludedPaths, &mods); components.initGlobalBroadcaster( mods, rtl::Reference< RootAccess >(), &bc); } -- cgit