Replace MaybeNullWhen(false) with NotNullWhen(true)

This commit is contained in:
DrSmugleaf
2020-12-20 04:14:41 +01:00
parent f7edb9ce7e
commit 026d96fd2d
11 changed files with 41 additions and 48 deletions

View File

@@ -47,7 +47,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Items
/// <param name="handName">The name of the hand to get.</param>
/// <param name="item">The item in the held, null if no item is held</param>
/// <returns>Whether it was holding an item</returns>
bool TryGetItem(string handName, [MaybeNullWhen(false)] out ItemComponent item);
bool TryGetItem(string handName, [NotNullWhen(true)] out ItemComponent? item);
/// <summary>
/// Gets item held by the current active hand
@@ -102,7 +102,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Items
/// <returns>
/// true if the entity is held, false otherwise
/// </returns>
bool TryHand(IEntity entity, [MaybeNullWhen(false)] out string handName);
bool TryHand(IEntity entity, [NotNullWhen(true)] out string? handName);
/// <summary>
/// Drops the item contained in the slot to the same position as our entity.