Skip to content

Commit

Permalink
Merge pull request #6646 from YohDeadfall/master
Browse files Browse the repository at this point in the history
Used EqualityComparer<T>.Default to check values for equality
  • Loading branch information
maxkatz6 committed Sep 28, 2021
2 parents ed06ce5 + 32e2a5b commit b63cb51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Avalonia.Visuals/Media/FormattedText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public IEnumerable<Rect> HitTestTextRange(int index, int length)

private void Set<T>(ref T field, T value)
{
if (field != null && field.Equals(value))
if (EqualityComparer<T>.Default.Equals(field, value))
{
return;
}
Expand Down

0 comments on commit b63cb51

Please sign in to comment.