From 8c101f093b9a4d162a849a692faf73bbafa189fb Mon Sep 17 00:00:00 2001 From: Jason Nelson Date: Fri, 31 Aug 2018 10:16:03 -0700 Subject: [PATCH] [SL.Core] Replace == with Equals --- src/SixLabors.Core/Primitives/Point.cs | 2 +- src/SixLabors.Core/Primitives/Rectangle.cs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/SixLabors.Core/Primitives/Point.cs b/src/SixLabors.Core/Primitives/Point.cs index 112d8fea25..de01717962 100644 --- a/src/SixLabors.Core/Primitives/Point.cs +++ b/src/SixLabors.Core/Primitives/Point.cs @@ -268,7 +268,7 @@ namespace SixLabors.Primitives /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool Equals(Point other) => this.X == other.X && this.Y == other.Y; + public bool Equals(Point other) => this.X.Equals(other.X) && this.Y.Equals(other.Y); private static short HighInt16(int n) => unchecked((short)((n >> 16) & 0xffff)); diff --git a/src/SixLabors.Core/Primitives/Rectangle.cs b/src/SixLabors.Core/Primitives/Rectangle.cs index 61dc799161..441c251eb0 100644 --- a/src/SixLabors.Core/Primitives/Rectangle.cs +++ b/src/SixLabors.Core/Primitives/Rectangle.cs @@ -444,6 +444,10 @@ namespace SixLabors.Primitives /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public bool Equals(Rectangle other) => this.X == other.X && this.Y == other.Y && this.Width == other.Width && this.Height == other.Height; + public bool Equals(Rectangle other) => + this.X.Equals(other.X) && + this.Y.Equals(other.Y) && + this.Width.Equals(other.Width) && + this.Height.Equals(other.Height); } } \ No newline at end of file