Skip to content

Commit

Permalink
Merge pull request unoplatform#15427 from Youssef1313/issues/15392
Browse files Browse the repository at this point in the history
fix: Adjust CompositionObject.SetProperty equality
  • Loading branch information
Youssef1313 authored Feb 13, 2024
2 parents acca9f9 + f6c5ddd commit 20f6ee7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Uno.UI.Composition/Composition/CompositionObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private protected void SetProperty(ref int field, int value, [CallerMemberName]

private protected void SetProperty(ref float field, float value, [CallerMemberName] string? propertyName = null)
{
if (field == value)
if (field.Equals(value))
{
return;
}
Expand All @@ -98,7 +98,7 @@ private protected void SetProperty(ref float field, float value, [CallerMemberNa

private protected void SetProperty(ref Matrix3x2 field, Matrix3x2 value, [CallerMemberName] string? propertyName = null)
{
if (field == value)
if (field.Equals(value))
{
return;
}
Expand All @@ -110,7 +110,7 @@ private protected void SetProperty(ref Matrix3x2 field, Matrix3x2 value, [Caller

private protected void SetProperty(ref Matrix4x4 field, Matrix4x4 value, [CallerMemberName] string? propertyName = null)
{
if (field == value)
if (field.Equals(value))
{
return;
}
Expand All @@ -122,7 +122,7 @@ private protected void SetProperty(ref Matrix4x4 field, Matrix4x4 value, [Caller

private protected void SetProperty(ref Vector2 field, Vector2 value, [CallerMemberName] string? propertyName = null)
{
if (field == value)
if (field.Equals(value))
{
return;
}
Expand All @@ -134,7 +134,7 @@ private protected void SetProperty(ref Vector2 field, Vector2 value, [CallerMemb

private protected void SetProperty(ref Vector3 field, Vector3 value, [CallerMemberName] string? propertyName = null)
{
if (field == value)
if (field.Equals(value))
{
return;
}
Expand All @@ -146,7 +146,7 @@ private protected void SetProperty(ref Vector3 field, Vector3 value, [CallerMemb

private protected void SetProperty(ref Quaternion field, Quaternion value, [CallerMemberName] string? propertyName = null)
{
if (field == value)
if (field.Equals(value))
{
return;
}
Expand Down

0 comments on commit 20f6ee7

Please sign in to comment.