mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-15 14:52:20 +01:00
Enable nullable reference types for Emby.Server.Implementations
This commit is contained in:
@@ -20,7 +20,7 @@ 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));
|
||||
}
|
||||
@@ -30,9 +30,9 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// </summary>
|
||||
/// <param name="x">The x.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
private static int GetValue(BaseItem x)
|
||||
private static int GetValue(BaseItem? x)
|
||||
{
|
||||
return x.IsFolder ? 0 : 1;
|
||||
return x?.IsFolder ?? true ? 0 : 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user