Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ InsertionBalance()

void System.Collections.Generic.SortedSet< T >.InsertionBalance ( Node current,
ref Node parent,
Node grandParent,
Node greatGrandParent )
inlineprivateinherited

Definition at line 1174 of file SortedSet.cs.

1175 {
1176 bool flag = grandParent.Right == parent;
1177 bool flag2 = parent.Right == current;
1178 Node node;
1179 if (flag == flag2)
1180 {
1181 node = (flag2 ? grandParent.RotateLeft() : grandParent.RotateRight());
1182 }
1183 else
1184 {
1185 node = (flag2 ? grandParent.RotateLeftRight() : grandParent.RotateRightLeft());
1186 parent = greatGrandParent;
1187 }
1188 grandParent.ColorRed();
1189 node.ColorBlack();
1191 }
void ReplaceChildOrRoot(Node parent, Node child, Node newChild)

References System.Runtime.Serialization.Dictionary, and System.Collections.Generic.SortedSet< T >.ReplaceChildOrRoot().

Referenced by System.Collections.Generic.SortedSet< T >.AddIfNotPresent().