]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/sort.qh
Step 5: complete
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / sort.qh
index 32ae28112f16b98805789a1ee85aa9a8b5705f0e..2790cdf2dc3cc760dbe814bc8c8edb3be2322695 100644 (file)
@@ -1,10 +1,9 @@
-#ifndef SORT_H
-#define SORT_H
+#pragma once
 
 /** is only ever called for i1 < i2 */
-typedef void (int i1, int i2, entity pass) swapfunc_t;
+USING(swapfunc_t, void (int i1, int i2, entity pass));
 /** <0 for <, ==0 for ==, >0 for > (like strcmp) */
-typedef int (int i1, int i2, entity pass) comparefunc_t;
+USING(comparefunc_t, int (int i1, int i2, entity pass));
 
 void heapsort(int n, swapfunc_t swap, comparefunc_t cmp, entity pass)
 {
@@ -57,5 +56,3 @@ void shuffle(float n, swapfunc_t swap, entity pass)
                if (j != i) swap(j, i, pass);
        }
 }
-
-#endif