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 <[email protected]>
Authored: Thu Mar 30 08:11:41 2017 +0700
Committer: Shad Storhaug <[email protected]>
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;
         }
     }
 }

Reply via email to