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,14 +15,14 @@ namespace Emby.Server.Implementations.Sorting
/// <param name="x">The x.</param>
/// <param name="y">The y.</param>
/// <returns>System.Int32.</returns>
public int Compare(BaseItem x, BaseItem y)
public int Compare(BaseItem? x, BaseItem? y)
{
return GetValue(x).CompareTo(GetValue(y));
}
private static float GetValue(BaseItem x)
private static float GetValue(BaseItem? x)
{
return x.CriticRating ?? 0;
return x?.CriticRating ?? 0;
}
/// <summary>