Browse Source

[SL.Core] Replace == with Equals

pull/1087/head
Jason Nelson 8 years ago
parent
commit
8c101f093b
  1. 2
      src/SixLabors.Core/Primitives/Point.cs
  2. 6
      src/SixLabors.Core/Primitives/Rectangle.cs

2
src/SixLabors.Core/Primitives/Point.cs

@ -268,7 +268,7 @@ namespace SixLabors.Primitives
/// <inheritdoc/>
[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));

6
src/SixLabors.Core/Primitives/Rectangle.cs

@ -444,6 +444,10 @@ namespace SixLabors.Primitives
/// <inheritdoc/>
[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);
}
}
Loading…
Cancel
Save