[Libreoffice-commits] core.git: cppuhelper/source
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Fri Mar 12 14:44:56 UTC 2021
cppuhelper/source/servicemanager.hxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit bd0dd2589c435078d8d974e3b37da5edb5f74f9f
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Mar 10 19:19:26 2021 +0100
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Fri Mar 12 15:44:13 2021 +0100
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 at collabora.com>
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;
More information about the Libreoffice-commits
mailing list