aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2022-10-07 07:50:39 +0200
committerGitHub <noreply@github.com>2022-10-07 07:50:39 +0200
commit719e5eae16a3488de449a5b2a7c56132c8f1e5c1 (patch)
tree0eb900ce94fb549433274522424dda8617386f4b /Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs
parent9ff918cb142f837bd55e1f87aba3f68f7de295e4 (diff)
parentf5613add1af9e789a7c16f6f631cccd329d5841a (diff)
Merge pull request #8503 from Bond-009/ThrowIfNull
Diffstat (limited to 'Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs')
-rw-r--r--Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs b/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs
index 5f142fa4b..5cb11ab46 100644
--- a/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs
+++ b/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs
@@ -23,15 +23,9 @@ namespace Emby.Server.Implementations.Sorting
/// <returns>System.Int32.</returns>
public int Compare(BaseItem? x, BaseItem? y)
{
- if (x == null)
- {
- throw new ArgumentNullException(nameof(x));
- }
+ ArgumentNullException.ThrowIfNull(x);
- if (y == null)
- {
- throw new ArgumentNullException(nameof(y));
- }
+ ArgumentNullException.ThrowIfNull(y);
return (x.CommunityRating ?? 0).CompareTo(y.CommunityRating ?? 0);
}