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:
committed by
Christopher F
parent
abf3e905f2
commit
1b54883896
@@ -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><:dab:277855270321782784></c>).</param>
|
/// <param name="text">The raw encoding of an emote (e.g. <c><:dab:277855270321782784></c>).</param>
|
||||||
|
|||||||
Reference in New Issue
Block a user