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

◆ IntrospectiveSort()

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

Definition at line 276 of file Array.cs.

277 {
278 if (length < 2)
279 {
280 return;
281 }
282 try
283 {
284 IntroSort(left, length + left - 1, 2 * (BitOperations.Log2((uint)length) + 1));
285 }
286 catch (IndexOutOfRangeException)
287 {
288 ThrowHelper.ThrowArgumentException_BadComparer(comparer);
289 }
290 catch (Exception e)
291 {
292 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.InvalidOperation_IComparerFailed, e);
293 }
294 }
static int Log2(uint value)
readonly IComparer comparer
Definition Array.cs:233
void IntroSort(int lo, int hi, int depthLimit)
Definition Array.cs:296

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

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