Added nullability to SafeHANDLE operators (#459)

nullableenabled
David Hall 2024-05-05 17:42:08 -06:00
parent c7913b9d5a
commit 7919216bbe
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ public abstract class SafeHANDLE : SafeHandleZeroOrMinusOneIsInvalid, IEquatable
/// <param name="h1">The first handle.</param>
/// <param name="h2">The second handle.</param>
/// <returns>The result of the operator.</returns>
public static bool operator !=(SafeHANDLE h1, IHandle? h2) => !(h1 == h2);
public static bool operator !=(SafeHANDLE? h1, IHandle? h2) => !(h1 == h2);
/// <summary>Implements the operator !=.</summary>
/// <param name="h1">The first handle.</param>
@ -48,7 +48,7 @@ public abstract class SafeHANDLE : SafeHandleZeroOrMinusOneIsInvalid, IEquatable
/// <param name="h1">The first handle.</param>
/// <param name="h2">The second handle.</param>
/// <returns>The result of the operator.</returns>
public static bool operator ==(SafeHANDLE h1, IHandle? h2) => h1?.Equals(h2) ?? h2 is null;
public static bool operator ==(SafeHANDLE? h1, IHandle? h2) => h1?.Equals(h2) ?? h2 is null;
/// <summary>Implements the operator ==.</summary>
/// <param name="h1">The first handle.</param>