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

Comparing jsr166/src/main/java/util/TimSort.java (file contents):
Revision 1.3 by jsr166, Tue Sep 1 22:23:10 2009 UTC vs.
Revision 1.4 by jsr166, Wed Sep 1 20:12:39 2010 UTC

# Line 269 | Line 269 | class TimSort<T> {
269               */
270              int n = start - left;  // The number of elements to move
271              // Switch is just an optimization for arraycopy in default case
272 <            switch(n) {
272 >            switch (n) {
273                  case 2:  a[left + 2] = a[left + 1];
274                  case 1:  a[left + 1] = a[left];
275                           break;
# Line 313 | Line 313 | class TimSort<T> {
313  
314          // Find end of run, and reverse range if descending
315          if (c.compare(a[runHi++], a[lo]) < 0) { // Descending
316 <            while(runHi < hi && c.compare(a[runHi], a[runHi - 1]) < 0)
316 >            while (runHi < hi && c.compare(a[runHi], a[runHi - 1]) < 0)
317                  runHi++;
318              reverseRange(a, lo, runHi);
319          } else {                              // Ascending

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines