mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-17 07:48:50 +01:00
Use std::stable_sort instead of std::sort. When xsl:sort specifies a numerical sort, but you've got some string data in there we need to maintain the relative of that string data. This is the first time I've actually used std::stable_sort. I will mark it down in my big book of programming accomplishments.
This commit is contained in:
parent
a697193623
commit
2053c94f4a
1 changed files with 1 additions and 1 deletions
|
@ -165,7 +165,7 @@ protected:
|
|||
}
|
||||
|
||||
sort_->set_context(node, context);
|
||||
std::sort(nodes.begin(), nodes.end(), SortP(*sort_));
|
||||
std::stable_sort(nodes.begin(), nodes.end(), SortP(*sort_));
|
||||
} // sort
|
||||
|
||||
bool has_sort() const { return sort_ != 0; }
|
||||
|
|
Loading…
Reference in a new issue