fix: Changed Emote GetHashCode to not include Name (#1317)

Continuation of commit abf3e90 attempt to fix Emote comparisons,
as Hash comparisons are done before Equals in Comparers
This commit is contained in:
Tiago Cabral
2019-06-04 19:04:53 +01:00
committed by Christopher F
parent abf3e905f2
commit 1b54883896

View File

@@ -54,13 +54,7 @@ namespace Discord
} }
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode() => Id.GetHashCode();
{
unchecked
{
return (Name.GetHashCode() * 397) ^ Id.GetHashCode();
}
}
/// <summary> Parses an <see cref="Emote"/> from its raw format. </summary> /// <summary> Parses an <see cref="Emote"/> from its raw format. </summary>
/// <param name="text">The raw encoding of an emote (e.g. <c>&lt;:dab:277855270321782784&gt;</c>).</param> /// <param name="text">The raw encoding of an emote (e.g. <c>&lt;:dab:277855270321782784&gt;</c>).</param>