1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-10 02:05:43 +00:00

Fix CS8600 and CS8602

This commit is contained in:
Oliver Booth 2022-11-29 17:26:03 +00:00
parent f3b40d30b3
commit 8dfe6d5082
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
3 changed files with 11 additions and 4 deletions

View File

@ -1,4 +1,5 @@
using System.Drawing;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
namespace X10D.Drawing;
@ -128,7 +129,7 @@ public class Polygon : IEquatable<Polygon>
/// <see langword="true" /> if <paramref name="left" /> and <paramref name="right" /> are considered not equal; otherwise,
/// <see langword="false" />.
/// </returns>
public static bool operator !=(Polygon left, Polygon right)
public static bool operator !=(Polygon? left, Polygon? right)
{
return !(left == right);
}
@ -138,6 +139,7 @@ public class Polygon : IEquatable<Polygon>
/// </summary>
/// <param name="polygon">The polygon to convert.</param>
/// <returns>The converted polygon.</returns>
[return: NotNullIfNotNull("polygon")]
public static explicit operator Polygon?(PolygonF? polygon)
{
return polygon is null ? null : FromPolygonF(polygon);

View File

@ -1,4 +1,5 @@
using System.Drawing;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
using System.Numerics;
using X10D.Numerics;
@ -169,6 +170,7 @@ public class PolygonF
/// </summary>
/// <param name="polygon">The polygon to convert.</param>
/// <returns>The converted polygon.</returns>
[return: NotNullIfNotNull("polygon")]
public static implicit operator PolygonF?(Polygon? polygon)
{
return polygon is null ? null : FromPolygon(polygon);

View File

@ -1,4 +1,5 @@
using System.Drawing;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
using System.Numerics;
namespace X10D.Drawing;
@ -140,6 +141,7 @@ public class Polyhedron : IEquatable<Polyhedron>
/// <returns>
/// The converted polyhedron, or <see langword="null" /> if <paramref name="polygon" /> is <see langword="null" />.
/// </returns>
[return: NotNullIfNotNull("polygon")]
public static implicit operator Polyhedron?(Polygon? polygon)
{
return polygon is null ? null : FromPolygon(polygon);
@ -152,6 +154,7 @@ public class Polyhedron : IEquatable<Polyhedron>
/// <returns>
/// The converted polyhedron, or <see langword="null" /> if <paramref name="polygon" /> is <see langword="null" />.
/// </returns>
[return: NotNullIfNotNull("polygon")]
public static implicit operator Polyhedron?(PolygonF? polygon)
{
return polygon is null ? null : FromPolygonF(polygon);