From f6c5dddae669b914f02ef7c81c69a66521459c55 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 9 Feb 2024 23:54:26 +0200 Subject: [PATCH] fix: Adjust CompositionObject.SetProperty equality --- .../Composition/CompositionObject.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Uno.UI.Composition/Composition/CompositionObject.cs b/src/Uno.UI.Composition/Composition/CompositionObject.cs index 7a2c0f1af1c8..8ebbee4b7a05 100644 --- a/src/Uno.UI.Composition/Composition/CompositionObject.cs +++ b/src/Uno.UI.Composition/Composition/CompositionObject.cs @@ -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; } @@ -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; } @@ -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; } @@ -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; } @@ -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; } @@ -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; }