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

◆ SwapIfGreaterWithValues()

static void System.Collections.Generic.GenericArraySortHelper< TKey, TValue >.SwapIfGreaterWithValues ( Span< TKey > keys,
Span< TValue > values,
int i,
int j )
inlinestaticprivate

Definition at line 531 of file GenericArraySortHelper.cs.

532 {
533 ref TKey reference = ref keys[i];
534 if (reference != null && GreaterThan(ref reference, ref keys[j]))
535 {
536 TKey val = reference;
537 keys[i] = keys[j];
538 keys[j] = val;
539 TValue val2 = values[i];
540 values[i] = values[j];
541 values[j] = val2;
542 }
543 }

References System.Collections.Generic.GenericArraySortHelper< TKey, TValue >.GreaterThan(), System.keys, and System.values.

Referenced by System.Collections.Generic.GenericArraySortHelper< TKey, TValue >.IntroSort(), and System.Collections.Generic.GenericArraySortHelper< TKey, TValue >.PickPivotAndPartition().