mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-04 23:29:17 +00:00
Modernize std::stable_sort
with ranges and projections
This commit is contained in:
parent
8b9f92a0af
commit
c9f589faa5
4 changed files with 13 additions and 27 deletions
|
@ -1335,8 +1335,7 @@ void VolumeVerifier::Finish()
|
|||
}
|
||||
|
||||
// Show the most serious problems at the top
|
||||
std::stable_sort(m_result.problems.begin(), m_result.problems.end(),
|
||||
[](const Problem& p1, const Problem& p2) { return p1.severity > p2.severity; });
|
||||
std::ranges::stable_sort(m_result.problems, std::ranges::greater{}, &Problem::severity);
|
||||
const Severity highest_severity =
|
||||
m_result.problems.empty() ? Severity::None : m_result.problems[0].severity;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue