GetHashCode can be simplified

This commit is contained in:
Raymond 2021-08-09 11:24:03 -04:00
parent e6861b1cff
commit 8531603ff2

View file

@ -84,12 +84,7 @@ namespace Dalamud.Game.Text.SeStringHandling.Payloads
/// <inheritdoc/>
public override int GetHashCode()
{
// Generated random values.
var hashCode = 1216194372;
hashCode = (hashCode * -1521134295) + this.Type.GetHashCode();
hashCode = (hashCode * -1521134295) + this.chunkType.GetHashCode();
hashCode = (hashCode * -1521134295) + EqualityComparer<byte[]>.Default.GetHashCode(this.data);
return hashCode;
return HashCode.Combine(this.Type, this.chunkType, this.data);
}
/// <inheritdoc/>