Browse Source

[SL.Core] Use expressions

pull/1087/head
Jason Nelson 8 years ago
parent
commit
43693a96f5
  1. 6
      src/SixLabors.Core/Primitives/Point.cs
  2. 5
      src/SixLabors.Core/Primitives/PointF.cs
  3. 5
      src/SixLabors.Core/Primitives/Size.cs
  4. 5
      src/SixLabors.Core/Primitives/SizeF.cs

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

@ -264,10 +264,7 @@ namespace SixLabors.Primitives
} }
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() public override string ToString() => $"Point [ X={this.X}, Y={this.Y} ]";
{
return $"Point [ X={this.X}, Y={this.Y} ]";
}
/// <inheritdoc/> /// <inheritdoc/>
public override bool Equals(object obj) => obj is Point other && this.Equals(other); public override bool Equals(object obj) => obj is Point other && this.Equals(other);
@ -279,6 +276,5 @@ namespace SixLabors.Primitives
private static short HighInt16(int n) => unchecked((short)((n >> 16) & 0xffff)); private static short HighInt16(int n) => unchecked((short)((n >> 16) & 0xffff));
private static short LowInt16(int n) => unchecked((short)(n & 0xffff)); private static short LowInt16(int n) => unchecked((short)(n & 0xffff));
} }
} }

5
src/SixLabors.Core/Primitives/PointF.cs

@ -273,10 +273,7 @@ namespace SixLabors.Primitives
} }
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() public override string ToString() => $"PointF [ X={this.X}, Y={this.Y} ]";
{
return $"PointF [ X={this.X}, Y={this.Y} ]";
}
/// <inheritdoc/> /// <inheritdoc/>
public override bool Equals(object obj) => obj is PointF && this.Equals((PointF)obj); public override bool Equals(object obj) => obj is PointF && this.Equals((PointF)obj);

5
src/SixLabors.Core/Primitives/Size.cs

@ -255,10 +255,7 @@ namespace SixLabors.Primitives
public override int GetHashCode() => this.GetHashCode(this); public override int GetHashCode() => this.GetHashCode(this);
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() public override string ToString() => $"Size [ Width={this.Width}, Height={this.Height} ]";
{
return $"Size [ Width={this.Width}, Height={this.Height} ]";
}
/// <inheritdoc/> /// <inheritdoc/>
public override bool Equals(object obj) => obj is Size && this.Equals((Size)obj); public override bool Equals(object obj) => obj is Size && this.Equals((Size)obj);

5
src/SixLabors.Core/Primitives/SizeF.cs

@ -204,10 +204,7 @@ namespace SixLabors.Primitives
} }
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() public override string ToString() => $"SizeF [ Width={this.Width}, Height={this.Height} ]";
{
return $"SizeF [ Width={this.Width}, Height={this.Height} ]";
}
/// <inheritdoc/> /// <inheritdoc/>
public override bool Equals(object obj) => obj is SizeF && this.Equals((SizeF)obj); public override bool Equals(object obj) => obj is SizeF && this.Equals((SizeF)obj);

Loading…
Cancel
Save