Replace CanBeNull annotations with nullable reference types (#1270)

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
DrSmugleaf
2020-07-08 01:41:20 +02:00
committed by GitHub
parent 5aefae184c
commit e7d756811e
25 changed files with 95 additions and 112 deletions

View File

@@ -1,4 +1,5 @@
using Content.Server.GameObjects.Components.Strap;
#nullable enable
using Content.Server.GameObjects.Components.Strap;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.Interfaces;
using Content.Server.Interfaces.GameObjects.Components.Interaction;
@@ -8,7 +9,6 @@ using Content.Shared.GameObjects;
using Content.Shared.GameObjects.Components.Mobs;
using Content.Shared.GameObjects.Components.Strap;
using Content.Shared.GameObjects.EntitySystems;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.GameObjects;
@@ -25,15 +25,15 @@ namespace Content.Server.GameObjects.Components.Mobs
public class BuckleComponent : SharedBuckleComponent, IInteractHand, IDragDrop
{
#pragma warning disable 649
[Dependency] private readonly IEntitySystemManager _entitySystem;
[Dependency] private readonly IServerNotifyManager _notifyManager;
[Dependency] private readonly IEntitySystemManager _entitySystem = default!;
[Dependency] private readonly IServerNotifyManager _notifyManager = default!;
#pragma warning restore 649
[CanBeNull] private StrapComponent _buckledTo;
private StrapComponent? _buckledTo;
private int _size;
[ViewVariables, CanBeNull]
public StrapComponent BuckledTo
[ViewVariables]
public StrapComponent? BuckledTo
{
get => _buckledTo;
private set