mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-21 16:37:00 +00:00
Use the new C# 14 null propagation setter
This commit is contained in:
parent
456db46065
commit
09748b140a
13 changed files with 33 additions and 123 deletions
|
|
@ -250,10 +250,7 @@ namespace Ryujinx.Common.Collections
|
|||
{
|
||||
T right = RightOf(node);
|
||||
node.Right = LeftOf(right);
|
||||
if (node.Right != null)
|
||||
{
|
||||
node.Right.Parent = node;
|
||||
}
|
||||
node.Right?.Parent = node;
|
||||
|
||||
T nodeParent = ParentOf(node);
|
||||
right.Parent = nodeParent;
|
||||
|
|
@ -281,10 +278,7 @@ namespace Ryujinx.Common.Collections
|
|||
{
|
||||
T left = LeftOf(node);
|
||||
node.Left = RightOf(left);
|
||||
if (node.Left != null)
|
||||
{
|
||||
node.Left.Parent = node;
|
||||
}
|
||||
node.Left?.Parent = node;
|
||||
|
||||
T nodeParent = ParentOf(node);
|
||||
left.Parent = nodeParent;
|
||||
|
|
@ -329,10 +323,7 @@ namespace Ryujinx.Common.Collections
|
|||
/// <param name="color">Color (Boolean)</param>
|
||||
protected static void SetColor(T node, bool color)
|
||||
{
|
||||
if (node != null)
|
||||
{
|
||||
node.Color = color;
|
||||
}
|
||||
node?.Color = color;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue