Use stable sort again

Before the multi-mode refactor the sort helpers wrapped stable_sort,
switch to stable_sort again as the sorting influences which vertex is
returned from Sta::worstSlack().

Signed-off-by: Martin Povišer <povik@cutebit.org>
This commit is contained in:
Martin Povišer 2026-02-24 12:51:55 +00:00
parent a14a16c3ad
commit fe31eef7a6
1 changed files with 2 additions and 2 deletions

View File

@ -408,7 +408,7 @@ void
sort(Range& r,
Comp comp = Comp{})
{
std::sort(std::ranges::begin(r), std::ranges::end(r), comp);
std::stable_sort(std::ranges::begin(r), std::ranges::end(r), comp);
}
@ -423,7 +423,7 @@ void
sort(Range* r,
Comp comp = Comp{})
{
std::sort(std::ranges::begin(*r), std::ranges::end(*r), comp);
std::stable_sort(std::ranges::begin(*r), std::ranges::end(*r), comp);
}
} // namespace