Enable nullability everywhere

This commit is contained in:
Matt Nadareski
2024-02-28 19:19:50 -05:00
parent 11d024bd16
commit 823a9ca7b7
145 changed files with 1545 additions and 1260 deletions

View File

@@ -128,15 +128,15 @@ namespace SabreTools.Help
protected static List<string> GetList(Dictionary<string, Feature> features, string key)
{
if (!features.ContainsKey(key))
return new List<string>();
return [];
return features[key].GetListValue() ?? new List<string>();
return features[key].GetListValue() ?? [];
}
/// <summary>
/// Get string value from nullable feature
/// </summary>
protected static string GetString(Dictionary<string, Feature> features, string key)
protected static string? GetString(Dictionary<string, Feature> features, string key)
{
if (!features.ContainsKey(key))
return null;