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

◆ IntrospectiveSort()

void System.Array.SorterObjectArray.IntrospectiveSort ( int left,
int length )
inlineprivate

Definition at line 71 of file Array.cs.

72 {
73 if (length < 2)
74 {
75 return;
76 }
77 try
78 {
79 IntroSort(left, length + left - 1, 2 * (BitOperations.Log2((uint)length) + 1));
80 }
81 catch (IndexOutOfRangeException)
82 {
83 ThrowHelper.ThrowArgumentException_BadComparer(comparer);
84 }
85 catch (Exception e)
86 {
87 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.InvalidOperation_IComparerFailed, e);
88 }
89 }
static int Log2(uint value)
void IntroSort(int lo, int hi, int depthLimit)
Definition Array.cs:91
readonly IComparer comparer
Definition Array.cs:28

References System.Array.SorterObjectArray.comparer, System.Array.SorterObjectArray.IntroSort(), System.length, System.Numerics.BitOperations.Log2(), System.ThrowHelper.ThrowArgumentException_BadComparer(), and System.ThrowHelper.ThrowInvalidOperationException().

Referenced by System.Array.SorterObjectArray.Sort().