mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-24 18:06:42 +02:00
Enhancement
- Corrected sorting to use std::stable_sort instead of std::sort, which is not guaranteed stable (thanks to Stefan Hacker).
This commit is contained in:
parent
954db75b37
commit
96d406960d
3 changed files with 4 additions and 1 deletions
1
AUTHORS
1
AUTHORS
|
@ -79,4 +79,5 @@ suggestions:
|
||||||
Patrick R McDonald
|
Patrick R McDonald
|
||||||
Pete Lewis
|
Pete Lewis
|
||||||
Bryce Harrington
|
Bryce Harrington
|
||||||
|
Stefan Hacker
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
2.0.0 ()
|
2.0.0 ()
|
||||||
+ autoconf eliminated.
|
+ autoconf eliminated.
|
||||||
|
+ Corrected sorting to use std::stable_sort instead of std::sort, which is not
|
||||||
|
guaranteed stable (thanks to Stefan Hacker).
|
||||||
|
|
||||||
------ old releases ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
|
|
@ -829,7 +829,7 @@ const std::string Table::render (int maxrows /* = 0 */, int maxlines /* = 0 */)
|
||||||
if (mSortColumns.size ())
|
if (mSortColumns.size ())
|
||||||
{
|
{
|
||||||
table = this; // Substitute for 'this' in the static 'sort_compare'.
|
table = this; // Substitute for 'this' in the static 'sort_compare'.
|
||||||
std::sort (order.begin (), order.end (), sort_compare);
|
std::stable_sort (order.begin (), order.end (), sort_compare);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue