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 authored and grokys committed Sep 29, 2021
1 parent 1193af3 commit 43621d7
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 43621d7

Please sign in to comment.