Skip to content

Commit

Permalink
nullable refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sailro committed Apr 22, 2024
1 parent 0a16a18 commit 859d23a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Features/FeatureRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
using EFT.Trainer.UI;
using UnityEngine;

#nullable enable

namespace EFT.Trainer.Features;

internal abstract class FeatureRenderer : ToggleFeature
Expand Down
4 changes: 2 additions & 2 deletions Installer/Installation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private static IEnumerable<Installation> DiscoverInstallations()
if (TryDiscoverInstallation(Environment.CurrentDirectory, out var installation))
yield return installation;

if (TryDiscoverInstallation(Path.GetDirectoryName(AppContext.BaseDirectory)!, out installation))
if (TryDiscoverInstallation(Path.GetDirectoryName(AppContext.BaseDirectory), out installation))
yield return installation;

using var hive = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32);
Expand Down Expand Up @@ -116,7 +116,7 @@ private static IEnumerable<Installation> DiscoverInstallations()
}
}

private static bool TryDiscoverInstallation(string path, [NotNullWhen(true)] out Installation? installation)
private static bool TryDiscoverInstallation(string? path, [NotNullWhen(true)] out Installation? installation)
{
installation = null;

Expand Down

0 comments on commit 859d23a

Please sign in to comment.