提交 7b684e62 编写于 作者: S Sam Harwell

Use Hash.Combine instead of the long form generated by the IDE

上级 4f0d7b1d
......@@ -5,6 +5,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.Diagnostics
{
......@@ -74,10 +75,9 @@ public bool Equals(Suppression other)
public override int GetHashCode()
{
int hashCode = 1755072348;
hashCode = hashCode * -1521134295 + EqualityComparer<SuppressionDescriptor>.Default.GetHashCode(Descriptor);
hashCode = hashCode * -1521134295 + EqualityComparer<Diagnostic>.Default.GetHashCode(SuppressedDiagnostic);
return hashCode;
return Hash.Combine(
EqualityComparer<SuppressionDescriptor>.Default.GetHashCode(Descriptor),
EqualityComparer<Diagnostic>.Default.GetHashCode(SuppressedDiagnostic));
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册