Skip to content
Permalink
Browse files
Use Math.min alculations.
  • Loading branch information
garydgregory committed Feb 20, 2022
1 parent 87fd7cb commit 239e19926ea3afd6f095666298fe23aaeaff56e7
Showing 1 changed file with 2 additions and 6 deletions.
@@ -315,10 +315,6 @@ private void fvswap(final int[] fmap, int yyp1, int yyp2, int yyn) {
}
}

private int fmin(final int a, final int b) {
return Math.min(a, b);
}

private void fpush(final int sp, final int lz, final int hz) {
stack_ll[sp] = lz;
stack_hh[sp] = hz;
@@ -421,9 +417,9 @@ private void fallbackQSort3(final int[] fmap,
continue;
}

n = fmin(ltLo - lo, unLo - ltLo);
n = Math.min(ltLo - lo, unLo - ltLo);
fvswap(fmap, lo, unLo - n, n);
int m = fmin(hi - gtHi, gtHi - unHi);
int m = Math.min(hi - gtHi, gtHi - unHi);
fvswap(fmap, unHi + 1, hi - m + 1, m);

n = lo + unLo - ltLo - 1;

0 comments on commit 239e199

Please sign in to comment.