diff options
| author | Bond-009 <bond.009@outlook.com> | 2023-02-19 15:08:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-19 15:08:35 +0100 |
| commit | bb6f867067aad14c12a77bd1f9f5292f75d7bbfb (patch) | |
| tree | 30471bc873fb0ebb93676938d600af13d7208af8 /Emby.Server.Implementations/Sorting/StartDateComparer.cs | |
| parent | de96fe1f521a9869544f4550fa2e7186f192fcd3 (diff) | |
| parent | cb85fc688f84de928e046cb6bd02629f04d68df6 (diff) | |
Merge pull request #9322 from Bond-009/nullable
Diffstat (limited to 'Emby.Server.Implementations/Sorting/StartDateComparer.cs')
| -rw-r--r-- | Emby.Server.Implementations/Sorting/StartDateComparer.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Sorting/StartDateComparer.cs b/Emby.Server.Implementations/Sorting/StartDateComparer.cs index c3df7c47e..2759d20de 100644 --- a/Emby.Server.Implementations/Sorting/StartDateComparer.cs +++ b/Emby.Server.Implementations/Sorting/StartDateComparer.cs @@ -1,5 +1,3 @@ -#nullable disable - #pragma warning disable CS1591 using System; @@ -24,7 +22,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 GetDate(x).CompareTo(GetDate(y)); } @@ -34,7 +32,7 @@ namespace Emby.Server.Implementations.Sorting /// </summary> /// <param name="x">The x.</param> /// <returns>DateTime.</returns> - private static DateTime GetDate(BaseItem x) + private static DateTime GetDate(BaseItem? x) { if (x is LiveTvProgram hasStartDate) { |
