Use stable sort.

llvm-svn: 54222
This commit is contained in:
Ted Kremenek 2008-07-30 18:03:31 +00:00
parent e8fce56cd1
commit 6a77d42a4d
1 changed files with 2 additions and 2 deletions

View File

@ -148,9 +148,9 @@ sorttable = {
row_array[row_array.length] = [sorttable.getInnerText(rows[j].cells[col]), rows[j]]; row_array[row_array.length] = [sorttable.getInnerText(rows[j].cells[col]), rows[j]];
} }
/* If you want a stable sort, uncomment the following line */ /* If you want a stable sort, uncomment the following line */
//sorttable.shaker_sort(row_array, this.sorttable_sortfunction); sorttable.shaker_sort(row_array, this.sorttable_sortfunction);
/* and comment out this one */ /* and comment out this one */
row_array.sort(this.sorttable_sortfunction); //row_array.sort(this.sorttable_sortfunction);
tb = this.sorttable_tbody; tb = this.sorttable_tbody;
for (var j=0; j<row_array.length; j++) { for (var j=0; j<row_array.length; j++) {