diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-03-10 19:19:26 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-03-12 15:44:13 +0100 |
commit | bd0dd2589c435078d8d974e3b37da5edb5f74f9f (patch) | |
tree | 27b165e440128e137e380d20a7deb02510c5381e /cppuhelper | |
parent | 2502b80e57eb2116fd7043603833ff38f9da1320 (diff) |
use std::unordered_map in cppuhelper ServiceManager
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 <l.lunak@collabora.com>
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/servicemanager.hxx | 8 |
1 files changed, 4 insertions, 4 deletions
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 <sal/config.h> #include <cassert> -#include <map> +#include <unordered_map> #include <memory> #include <string_view> #include <vector> @@ -164,17 +164,17 @@ public: css::uno::Reference<css::uno::XInterface> 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; |