From bd0dd2589c435078d8d974e3b37da5edb5f74f9f Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Wed, 10 Mar 2021 19:19:26 +0100 Subject: use std::unordered_map in cppuhelper ServiceManager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's faster and I do not see any reason for the map to be sorted. cppuhelper::ServiceManager::findServiceImplementation() may be called quite often e.g. during text layout by i18npool::BreakIterator. Change-Id: If8c77c506b88a0a3eac29e0d20d43d2110eed4ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112280 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- cppuhelper/source/servicemanager.hxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cppuhelper') diff --git a/cppuhelper/source/servicemanager.hxx b/cppuhelper/source/servicemanager.hxx index f6a505492be8..d086a8d65ead 100644 --- a/cppuhelper/source/servicemanager.hxx +++ b/cppuhelper/source/servicemanager.hxx @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include @@ -164,17 +164,17 @@ public: css::uno::Reference const & instance); }; - typedef std::map< OUString, std::shared_ptr< Implementation > > + typedef std::unordered_map< OUString, std::shared_ptr< Implementation > > NamedImplementations; typedef - std::map< + std::unordered_map< css::uno::Reference< css::lang::XServiceInfo >, std::shared_ptr< Implementation > > DynamicImplementations; typedef - std::map< + std::unordered_map< OUString, std::vector< std::shared_ptr< Implementation > > > ImplementationMap; -- cgit