fix sort_and_merge_overlapping
This commit is contained in:
parent
84ea452ed2
commit
252f875926
|
@ -136,7 +136,7 @@ static void sort_and_merge_overlapping(SelectionList& selections)
|
||||||
[&](const Selection& sel)
|
[&](const Selection& sel)
|
||||||
{ return sel.begin() <= back.begin(); });
|
{ return sel.begin() <= back.begin(); });
|
||||||
std::stable_sort(selections.begin(), selections.end(), compare_selections);
|
std::stable_sort(selections.begin(), selections.end(), compare_selections);
|
||||||
if (back_rank < selections.size() - 1)
|
if (back_rank < selections.size())
|
||||||
std::rotate(selections.begin(), selections.begin() + back_rank,
|
std::rotate(selections.begin(), selections.begin() + back_rank,
|
||||||
selections.end());
|
selections.end());
|
||||||
assert(selections.back() == back);
|
assert(selections.back() == back);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user