diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-01 11:06:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-01 20:07:00 +0200 |
commit | fba13b3b52b22eea0000b25faf31a57b642d0ce7 (patch) | |
tree | 3f9a6caff56a77ce92bedf70fb55cb8579656c99 /xmloff | |
parent | 303aa36685f2d52cff6004f9b41b90629c26f978 (diff) |
unordered_map is better for pointer keys
Change-Id: I6d731ca2a312ea3fd00334f3135d15af6dcf637b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119817
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/shapeimport.cxx | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 792daaa5db3f..4fe64c9e1730 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -45,7 +45,7 @@ #include "ximpgrp.hxx" #include "ximplink.hxx" -#include <map> +#include <unordered_map> #include <string_view> #include <vector> @@ -69,21 +69,12 @@ struct ConnectionHint sal_Int32 nDestGlueId; }; -struct XShapeCompareHelper -{ - bool operator()(const css::uno::Reference < css::drawing::XShape >& x1, - const css::uno::Reference < css::drawing::XShape >& x2 ) const - { - return x1.get() < x2.get(); - } -}; - } /** this map store all glue point id mappings for shapes that had user defined glue points. This is needed because on insertion the glue points will get a new and unique id */ typedef std::map<sal_Int32,sal_Int32> GluePointIdMap; -typedef std::map< css::uno::Reference < css::drawing::XShape >, GluePointIdMap, XShapeCompareHelper > ShapeGluePointsMap; +typedef std::unordered_map< css::uno::Reference < css::drawing::XShape >, GluePointIdMap > ShapeGluePointsMap; /** this struct is created for each startPage() call and stores information that is needed during import of shapes for one page. Since pages could be nested ( notes pages inside impress ) there |