From 7be675cdfad328667bfbab043d71539dfd9e6fe6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 7 Apr 2019 16:25:49 +0200 Subject: 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 --- include/svx/sdasitm.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/svx/sdasitm.hxx') 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(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 -- cgit