aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-08-28 18:12:43 +0000
committerzakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-08-28 18:12:43 +0000
commit6c5c66acaeae0f28d2fa1489f8adb934b1d5da37 (patch)
treeb49b20cd976a2ec8b27963ab44b77e9ddfef221d
parent76fcdaefc0d0d77c56285d2b9aaf188d0ada250b (diff)
downloadioquake3-aero-6c5c66acaeae0f28d2fa1489f8adb934b1d5da37.tar.gz
ioquake3-aero-6c5c66acaeae0f28d2fa1489f8adb934b1d5da37.zip
https://bugzilla.icculus.org/show_bug.cgi?id=2348
git-svn-id: svn://svn.icculus.org/quake3/trunk@25 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/renderer/tr_main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/code/renderer/tr_main.c b/code/renderer/tr_main.c
index 54ae106..348c742 100644
--- a/code/renderer/tr_main.c
+++ b/code/renderer/tr_main.c
@@ -1021,7 +1021,6 @@ static inline void SWAP_DRAW_SURF(drawSurf_t* a, drawSurf_t* b)
static void shortsort( drawSurf_t *lo, drawSurf_t *hi ) {
drawSurf_t *p, *max;
- int temp;
while (hi > lo) {
max = lo;
@@ -1052,7 +1051,6 @@ void qsortFast (
unsigned size; /* size of the sub-array */
char *lostk[30], *histk[30];
int stkptr; /* stack for saving sub-array to be processed */
- int temp;
#if 0
if ( sizeof(drawSurf_t) != 8 ) {
@@ -1093,8 +1091,9 @@ recurse:
performance. */
mid = lo + (size / 2) * width; /* find middle element */
- SWAP_DRAW_SURF(mid, lo); /* swap it to beginning of array */
+ SWAP_DRAW_SURF((drawSurf_t *)mid, (drawSurf_t *)lo); /* swap it to beginning of array */
+
/* We now wish to partition the array into three pieces, one
consisiting of elements <= partition element, one of elements
equal to the parition element, and one of element >= to it. This
@@ -1134,7 +1133,7 @@ recurse:
A[loguy] > A[lo], A[higuy] < A[lo],
loguy < hi, highy > lo */
- SWAP_DRAW_SURF(loguy, higuy);
+ SWAP_DRAW_SURF((drawSurf_t *)loguy, (drawSurf_t *)higuy);
/* A[loguy] < A[lo], A[higuy] > A[lo]; so condition at top
of loop is re-established */
@@ -1148,7 +1147,7 @@ recurse:
A[i] <= A[lo] for lo <= i <= higuy,
A[i] = A[lo] for higuy < i < loguy */
- SWAP_DRAW_SURF(lo, higuy); /* put partition element in place */
+ SWAP_DRAW_SURF((drawSurf_t *)lo, (drawSurf_t *)higuy); /* put partition element in place */
/* OK, now we have the following:
A[i] >= A[higuy] for loguy <= i <= hi,