summaryrefslogtreecommitdiff
path: root/include/svx/sdasitm.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-07 16:25:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-08 08:52:09 +0200
commit7be675cdfad328667bfbab043d71539dfd9e6fe6 (patch)
tree94a83c67d26aaffb513863a6ab0e4f8f72b2dc4d /include/svx/sdasitm.hxx
parent1d556ff84dce01531ee334dc1408cebe50e97d22 (diff)
improve combining in hash functions
specifically, use boost::hash_combine to combine values in hash functions, except for a couple of places where I use the small-prime-number strategy popular in the Java world, to avoid including boost in header files that are widely shared. Change-Id: I0e184c9ec8803bf09fc6e84fe20131b203e1652a Reviewed-on: https://gerrit.libreoffice.org/70384 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx/sdasitm.hxx')
-rw-r--r--include/svx/sdasitm.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/svx/sdasitm.hxx b/include/svx/sdasitm.hxx
index 44bdfbc714d6..3e2623b0ca76 100644
--- a/include/svx/sdasitm.hxx
+++ b/include/svx/sdasitm.hxx
@@ -89,7 +89,10 @@ inline SdrOnOffItem makeSdrTextWordWrapItem( bool bAuto ) {
inline size_t SdrCustomShapeGeometryItem::PropertyPairHash::operator()( const SdrCustomShapeGeometryItem::PropertyPair &r1 ) const
{
- return static_cast<size_t>(r1.first.hashCode()) + r1.second.hashCode();
+ size_t hash = 17;
+ hash = hash * 37 + r1.first.hashCode();
+ hash = hash * 37 + r1.second.hashCode();
+ return hash;
};
#endif