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

◆ RemoveRecursive()

SortedInt32KeyNode< TValue > System.Collections.Immutable.SortedInt32KeyNode< TValue >.RemoveRecursive ( int key,
out bool mutated )
inlineprivate

Definition at line 379 of file SortedInt32KeyNode.cs.

380 {
381 if (IsEmpty)
382 {
383 mutated = false;
384 return this;
385 }
387 if (key == _key)
388 {
389 mutated = true;
390 if (_right.IsEmpty && _left.IsEmpty)
391 {
393 }
394 else if (_right.IsEmpty && !_left.IsEmpty)
395 {
397 }
398 else if (!_right.IsEmpty && _left.IsEmpty)
399 {
401 }
402 else
403 {
405 while (!sortedInt32KeyNode2._left.IsEmpty)
406 {
408 }
409 bool mutated2;
412 }
413 }
414 else if (key < _key)
415 {
417 if (mutated)
418 {
420 }
421 }
422 else
423 {
425 if (mutated)
426 {
428 }
429 }
430 if (!sortedInt32KeyNode.IsEmpty)
431 {
433 }
434 return sortedInt32KeyNode;
435 }
SortedInt32KeyNode< TValue > Mutate(SortedInt32KeyNode< TValue > left=null, SortedInt32KeyNode< TValue > right=null)
static SortedInt32KeyNode< TValue > MakeBalanced(SortedInt32KeyNode< TValue > tree)
static readonly SortedInt32KeyNode< TValue > EmptyNode

References System.Collections.Immutable.SortedInt32KeyNode< TValue >._key, System.Collections.Immutable.SortedInt32KeyNode< TValue >._left, System.Collections.Immutable.SortedInt32KeyNode< TValue >._right, System.Collections.Immutable.SortedInt32KeyNode< TValue >.EmptyNode, System.Collections.Immutable.SortedInt32KeyNode< TValue >.IsEmpty, System.key, System.Collections.Immutable.SortedInt32KeyNode< TValue >.MakeBalanced(), and System.Collections.Immutable.SortedInt32KeyNode< TValue >.Mutate().

Referenced by System.Collections.Immutable.SortedInt32KeyNode< TValue >.Remove().