Enable nullable reference types for Emby.Server.Implementations

This commit is contained in:
Bond_009
2021-05-20 21:28:18 +02:00
parent e8790bfa96
commit 7e8428e588
151 changed files with 300 additions and 99 deletions

View File

@@ -15,7 +15,7 @@ namespace Emby.Server.Implementations.Sorting
public string Name => ItemSortBy.Artist;
/// <inheritdoc />
public int Compare(BaseItem x, BaseItem y)
public int Compare(BaseItem? x, BaseItem? y)
{
return string.Compare(GetValue(x), GetValue(y), StringComparison.CurrentCultureIgnoreCase);
}
@@ -25,7 +25,7 @@ namespace Emby.Server.Implementations.Sorting
/// </summary>
/// <param name="x">The x.</param>
/// <returns>System.String.</returns>
private static string GetValue(BaseItem x)
private static string? GetValue(BaseItem? x)
{
if (!(x is Audio audio))
{