[Libreoffice-commits] core.git: xmloff/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sun Aug 1 18:07:35 UTC 2021
xmloff/source/draw/shapeimport.cxx | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
New commits:
commit fba13b3b52b22eea0000b25faf31a57b642d0ce7
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Aug 1 11:06:17 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Aug 1 20:07:00 2021 +0200
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 at collabora.co.uk>
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
More information about the Libreoffice-commits
mailing list