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

◆ QuickSort()

void System.Security.AccessControl.CommonAcl.QuickSort ( int left,
int right,
bool isDacl )
inlineprivateinherited

Definition at line 314 of file CommonAcl.cs.

315 {
316 if (left >= right)
317 {
318 return;
319 }
320 int num = left;
321 int num2 = right;
322 GenericAce genericAce = _acl[left];
323 int num3 = left;
324 while (left < right)
325 {
326 while (CompareAces(_acl[right], genericAce, isDacl) != 0 && left < right)
327 {
328 right--;
329 }
330 if (left != right)
331 {
332 _acl[left] = _acl[right];
333 left++;
334 }
335 while (ComparisonResult.GreaterThan != CompareAces(_acl[left], genericAce, isDacl) && left < right)
336 {
337 left++;
338 }
339 if (left != right)
340 {
341 _acl[right] = _acl[left];
342 right--;
343 }
344 }
345 _acl[left] = genericAce;
346 num3 = left;
347 left = num;
348 right = num2;
349 if (left < num3)
350 {
351 QuickSort(left, num3 - 1, isDacl);
352 }
353 if (right > num3)
354 {
355 QuickSort(num3 + 1, right, isDacl);
356 }
357 }
static ComparisonResult CompareAces(GenericAce ace1, GenericAce ace2, bool isDacl)
Definition CommonAcl.cs:287
void QuickSort(int left, int right, bool isDacl)
Definition CommonAcl.cs:314

References System.Security.AccessControl.CommonAcl._acl, System.Security.AccessControl.CommonAcl.CompareAces(), and System.Security.AccessControl.CommonAcl.QuickSort().

Referenced by System.Security.AccessControl.CommonAcl.Canonicalize(), and System.Security.AccessControl.CommonAcl.QuickSort().