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

@@ -53,7 +53,7 @@ namespace Content.Client.GameObjects.EntitySystems
// This is simpler to implement. If you want to optimize it be my guest.
var senderEnt = ev.Sender;
if (senderEnt.IsValid() &&
senderEnt.TryGetComponent(out IconSmoothComponent iconSmooth)
senderEnt.TryGetComponent(out IconSmoothComponent? iconSmooth)
&& iconSmooth.Running)
{
var snapGrid = senderEnt.GetComponent<SnapGridComponent>();
@@ -114,7 +114,7 @@ namespace Content.Client.GameObjects.EntitySystems
// As it stands now, it's totally possible for something to get queued twice.
// Generation on the component is set after an update so we can cull updates that happened this generation.
if (!entity.IsValid()
|| !entity.TryGetComponent(out IconSmoothComponent smoothing)
|| !entity.TryGetComponent(out IconSmoothComponent? smoothing)
|| smoothing.UpdateGeneration == _generation)
{
return;