ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/ComparableTimSort.java
(Generate patch)

Comparing jsr166/src/main/java/util/ComparableTimSort.java (file contents):
Revision 1.2 by jsr166, Tue Sep 1 22:27:21 2009 UTC vs.
Revision 1.3 by jsr166, Wed Sep 1 20:12:39 2010 UTC

# Line 236 | Line 236 | class ComparableTimSort {
236               */
237              int n = start - left;  // The number of elements to move
238              // Switch is just an optimization for arraycopy in default case
239 <            switch(n) {
239 >            switch (n) {
240                  case 2:  a[left + 2] = a[left + 1];
241                  case 1:  a[left + 1] = a[left];
242                           break;
# Line 279 | Line 279 | class ComparableTimSort {
279  
280          // Find end of run, and reverse range if descending
281          if (((Comparable) a[runHi++]).compareTo(a[lo]) < 0) { // Descending
282 <            while(runHi < hi && ((Comparable) a[runHi]).compareTo(a[runHi - 1]) < 0)
282 >            while (runHi < hi && ((Comparable) a[runHi]).compareTo(a[runHi - 1]) < 0)
283                  runHi++;
284              reverseRange(a, lo, runHi);
285          } else {                              // Ascending

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines