re PR classpath/31646 (Arrays.sort() broken)
2007-04-23 Jeroen Frijters <jeroen@frijters.net> PR classpath/31646: * java/util/Arrays.java (qsort): Corrected initial median calculation. From-SVN: r124071
This commit is contained in:
committed by
Tom Tromey
parent
9a072eb638
commit
f91141b1a2
@@ -1040,7 +1040,7 @@ public class Arrays
|
||||
}
|
||||
|
||||
// Determine a good median element.
|
||||
int mid = count / 2;
|
||||
int mid = from + count / 2;
|
||||
int lo = from;
|
||||
int hi = from + count - 1;
|
||||
|
||||
@@ -1204,7 +1204,7 @@ public class Arrays
|
||||
}
|
||||
|
||||
// Determine a good median element.
|
||||
int mid = count / 2;
|
||||
int mid = from + count / 2;
|
||||
int lo = from;
|
||||
int hi = from + count - 1;
|
||||
|
||||
@@ -1368,7 +1368,7 @@ public class Arrays
|
||||
}
|
||||
|
||||
// Determine a good median element.
|
||||
int mid = count / 2;
|
||||
int mid = from + count / 2;
|
||||
int lo = from;
|
||||
int hi = from + count - 1;
|
||||
|
||||
@@ -1544,7 +1544,7 @@ public class Arrays
|
||||
}
|
||||
|
||||
// Determine a good median element.
|
||||
int mid = count / 2;
|
||||
int mid = from + count / 2;
|
||||
int lo = from;
|
||||
int hi = from + count - 1;
|
||||
|
||||
@@ -1720,7 +1720,7 @@ public class Arrays
|
||||
}
|
||||
|
||||
// Determine a good median element.
|
||||
int mid = count / 2;
|
||||
int mid = from + count / 2;
|
||||
int lo = from;
|
||||
int hi = from + count - 1;
|
||||
|
||||
@@ -1890,7 +1890,7 @@ public class Arrays
|
||||
}
|
||||
|
||||
// Determine a good median element.
|
||||
int mid = count / 2;
|
||||
int mid = from + count / 2;
|
||||
int lo = from;
|
||||
int hi = from + count - 1;
|
||||
|
||||
@@ -2060,7 +2060,7 @@ public class Arrays
|
||||
}
|
||||
|
||||
// Determine a good median element.
|
||||
int mid = count / 2;
|
||||
int mid = from + count / 2;
|
||||
int lo = from;
|
||||
int hi = from + count - 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user