aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/Collections/IntrusiveRedBlackTree.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Common/Collections/IntrusiveRedBlackTree.cs')
-rw-r--r--Ryujinx.Common/Collections/IntrusiveRedBlackTree.cs16
1 files changed, 4 insertions, 12 deletions
diff --git a/Ryujinx.Common/Collections/IntrusiveRedBlackTree.cs b/Ryujinx.Common/Collections/IntrusiveRedBlackTree.cs
index 970cab87..0063d91e 100644
--- a/Ryujinx.Common/Collections/IntrusiveRedBlackTree.cs
+++ b/Ryujinx.Common/Collections/IntrusiveRedBlackTree.cs
@@ -17,10 +17,7 @@ namespace Ryujinx.Common.Collections
/// <exception cref="ArgumentNullException"><paramref name="node"/> is null</exception>
public void Add(T node)
{
- if (node == null)
- {
- throw new ArgumentNullException(nameof(node));
- }
+ ArgumentNullException.ThrowIfNull(node);
Insert(node);
}
@@ -32,10 +29,8 @@ namespace Ryujinx.Common.Collections
/// <exception cref="ArgumentNullException"><paramref name="node"/> is null</exception>
public void Remove(T node)
{
- if (node == null)
- {
- throw new ArgumentNullException(nameof(node));
- }
+ ArgumentNullException.ThrowIfNull(node);
+
if (Delete(node) != null)
{
Count--;
@@ -50,10 +45,7 @@ namespace Ryujinx.Common.Collections
/// <exception cref="ArgumentNullException"><paramref name="searchNode"/> is null</exception>
public T GetNode(T searchNode)
{
- if (searchNode == null)
- {
- throw new ArgumentNullException(nameof(searchNode));
- }
+ ArgumentNullException.ThrowIfNull(searchNode);
T node = Root;
while (node != null)