lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [16/50] lucenenet git commit: Lucene.Net.QueryParser.Flexibl.Standard.Config.NumericConfig: Factored out HashHelpers.CombineHashCodes
Date Thu, 30 Mar 2017 18:00:11 GMT
Lucene.Net.QueryParser.Flexibl.Standard.Config.NumericConfig: Factored out HashHelpers.CombineHashCodes


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/a701b994
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/a701b994
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/a701b994

Branch: refs/heads/api-work
Commit: a701b9941fe36e22664e0117292f2a3ed1eb3dd0
Parents: 1a251a1
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Thu Mar 30 08:11:41 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Mar 30 09:12:31 2017 +0700

----------------------------------------------------------------------
 .../Flexible/Standard/Config/NumericConfig.cs            | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a701b994/src/Lucene.Net.QueryParser/Flexible/Standard/Config/NumericConfig.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Config/NumericConfig.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/Config/NumericConfig.cs
index 913904a..13d5938 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Standard/Config/NumericConfig.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Config/NumericConfig.cs
@@ -115,11 +115,12 @@ namespace Lucene.Net.QueryParsers.Flexible.Standard.Config
         /// </summary>
         public override int GetHashCode()
         {
-            return HashHelpers.CombineHashCodes(
-                base.GetHashCode(), 
-                this.precisionStep.GetHashCode(), 
-                this.type.GetHashCode(), 
-                this.format.GetHashCode());
+            const int prime = 31;
+            int result = base.GetHashCode();
+            result = prime * result + this.precisionStep.GetHashCode();
+            result = prime * result + this.type.GetHashCode();
+            result = prime * result + this.format.GetHashCode();
+            return result;
         }
     }
 }


Mime
View raw message