[Libreoffice-commits] core.git: include/svx include/xmloff sc/inc

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 29 10:02:44 UTC 2019


 include/svx/sdasitm.hxx    |    5 ++++-
 include/xmloff/nmspmap.hxx |    5 ++++-
 sc/inc/externalrefmgr.hxx  |    3 ++-
 3 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit e70460f59056b0a4957b534ab26b5c64eb94926c
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Jul 29 09:09:06 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jul 29 12:01:58 2019 +0200

    revert bits of "loplugin:sequentialassign"
    
    from
            commit 0d36b32755ac662299e6a8165e9fa57311b74a2f
        Author: Noel Grandin <noel.grandin at collabora.co.uk>
        Date:   Sun Jul 28 12:03:35 2019 +0200
        loplugin:sequentialassign
    which were false positives and not meant to be committed
    
    Change-Id: I6f2f185bd3564c9329f5a0c78c9020f3ddb52d34
    Reviewed-on: https://gerrit.libreoffice.org/76518
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svx/sdasitm.hxx b/include/svx/sdasitm.hxx
index 84431a4969c0..e0aeaddab83a 100644
--- a/include/svx/sdasitm.hxx
+++ b/include/svx/sdasitm.hxx
@@ -88,7 +88,10 @@ inline SdrOnOffItem makeSdrTextWordWrapItem( bool bAuto ) {
 
 inline size_t SdrCustomShapeGeometryItem::PropertyPairHash::operator()( const SdrCustomShapeGeometryItem::PropertyPair &r1 ) const
 {
-    return r1.first.hashCode() * 37 + r1.second.hashCode();
+    size_t hash = 17;
+    hash = hash * 37 + r1.first.hashCode();
+    hash = hash * 37 + r1.second.hashCode();
+    return hash;
 };
 
 #endif
diff --git a/include/xmloff/nmspmap.hxx b/include/xmloff/nmspmap.hxx
index e6875b1c8a39..234b5e4dda2a 100644
--- a/include/xmloff/nmspmap.hxx
+++ b/include/xmloff/nmspmap.hxx
@@ -55,7 +55,10 @@ struct QNamePairHash
 {
     size_t operator()( const QNamePair &r1 ) const
     {
-        return r1.first * 37 + r1.second.hashCode();
+        size_t hash = 17;
+        hash = hash * 37 + r1.first;
+        hash = hash * 37 + r1.second.hashCode();
+        return hash;
     }
 };
 
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index ae6a7f8ab80b..7bd670f7cddd 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -305,7 +305,8 @@ private:
         {
             const ScAddress& s = rRange.aStart;
             const ScAddress& e = rRange.aEnd;
-            size_t hash = s.Tab();
+            size_t hash = 17;
+            hash = hash * 37 + s.Tab();
             hash = hash * 37 + s.Col();
             hash = hash * 37 + s.Row();
             hash = hash * 37 + e.Tab();


More information about the Libreoffice-commits mailing list