Skip to content

Commit 721d71f

Browse files
committed
Remove unneeded local variable
1 parent c4dbb21 commit 721d71f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

presto-common/src/main/java/com/facebook/presto/common/array/IntBigArrays.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,18 +147,16 @@ public static void quickSort(final int[][] x, final long from, final long to, fi
147147
swap(x, b++, c--);
148148
}
149149
// Swap partition elements back to middle
150-
long s;
151-
long n = to;
152-
s = Math.min(a - from, b - a);
150+
long s = Math.min(a - from, b - a);
153151
vecSwap(x, from, b - s, s);
154-
s = Math.min(d - c, n - d - 1);
155-
vecSwap(x, b, n - s, s);
152+
s = Math.min(d - c, to - d - 1);
153+
vecSwap(x, b, to - s, s);
156154
// Recursively sort non-partition-elements
157155
if ((s = b - a) > 1) {
158156
quickSort(x, from, from + s, comp);
159157
}
160158
if ((s = d - c) > 1) {
161-
quickSort(x, n - s, n, comp);
159+
quickSort(x, to - s, to, comp);
162160
}
163161
}
164162

0 commit comments

Comments
 (0)