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

◆ Sort()

void System.Data.Select.Sort ( int left,
int right )
inlineprivate

Definition at line 868 of file Select.cs.

869 {
870 int num;
871 do
872 {
873 num = left;
874 int num2 = right;
875 int record = _records[num + num2 >> 1];
876 while (true)
877 {
878 if (CompareRecords(_records[num], record) < 0)
879 {
880 num++;
881 continue;
882 }
883 while (CompareRecords(_records[num2], record) > 0)
884 {
885 num2--;
886 }
887 if (num <= num2)
888 {
889 int num3 = _records[num];
890 _records[num] = _records[num2];
891 _records[num2] = num3;
892 num++;
893 num2--;
894 }
895 if (num > num2)
896 {
897 break;
898 }
899 }
900 if (left < num2)
901 {
902 Sort(left, num2);
903 }
904 left = num;
905 }
906 while (num < right);
907 }
void Sort(int left, int right)
Definition Select.cs:868
int CompareRecords(int record1, int record2)
Definition Select.cs:837

References System.Data.Select._records, System.Data.Select.CompareRecords(), and System.Data.Select.Sort().

Referenced by System.Data.Select.SelectRows(), and System.Data.Select.Sort().