diff options
author | Marek Safar <marek.safar@gmail.com> | 2018-03-09 18:08:59 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-03-09 18:08:59 +0300 |
commit | ceff4fb1748c26be30a4100f28f97e46dbe294f2 (patch) | |
tree | a915cecaf1dde33198b1e9e6b357a991a5de43c2 | |
parent | 5fb83055466250bf860ef066029a21532d7f1915 (diff) |
Switch to legacy hashcode for string
-rw-r--r-- | src/System.Private.CoreLib/src/System/String.Comparison.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/src/System/String.Comparison.cs b/src/System.Private.CoreLib/src/System/String.Comparison.cs index 05f6f1bdd..b2ba02952 100644 --- a/src/System.Private.CoreLib/src/System/String.Comparison.cs +++ b/src/System.Private.CoreLib/src/System/String.Comparison.cs @@ -1057,7 +1057,11 @@ namespace System // they will return the same hash code. public override int GetHashCode() { +#if MONO + return LegacyStringGetHashCode(); +#else return Marvin.ComputeHash32(ref Unsafe.As<char, byte>(ref _firstChar), _stringLength * 2, Marvin.DefaultSeed); +#endif } // Gets a hash code for this string and this comparison. If strings A and B and comparison C are such |