Enable nullability in Content.Client (#3257)

* Enable nullability in Content.Client

* Remove #nullable enable

* Merge fixes

* Remove Debug.Assert

* Merge fixes

* Fix build

* Fix build
This commit is contained in:
DrSmugleaf
2021-03-10 14:48:29 +01:00
committed by GitHub
parent 4f9bd4e802
commit 902aa128c2
270 changed files with 1774 additions and 1550 deletions

View File

@@ -10,13 +10,13 @@ namespace Content.Client.GameObjects.Components.Atmos
{
}
private GasAnalyzerWindow _menu;
private GasAnalyzerWindow? _menu;
protected override void Open()
{
base.Open();
_menu = new GasAnalyzerWindow(this);
_menu = new GasAnalyzerWindow(this);
_menu.OnClose += Close;
_menu.OpenCentered();
}
@@ -24,7 +24,8 @@ namespace Content.Client.GameObjects.Components.Atmos
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
_menu.Populate((GasAnalyzerBoundUserInterfaceState) state);
_menu?.Populate((GasAnalyzerBoundUserInterfaceState) state);
}
public void Refresh()
@@ -35,10 +36,8 @@ namespace Content.Client.GameObjects.Components.Atmos
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (!disposing)
return;
_menu?.Dispose();
if (disposing) _menu?.Dispose();
}
}
}