mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-26 22:38:34 +00:00
Modernize std::sort
with ranges
This commit is contained in:
parent
bcaf665d14
commit
ebf7cebc32
5 changed files with 13 additions and 14 deletions
|
@ -101,7 +101,7 @@ BuildExpression(const std::vector<ciface::Core::DeviceContainer::InputDetection>
|
|||
}
|
||||
else
|
||||
{
|
||||
std::sort(alternation.begin(), alternation.end());
|
||||
std::ranges::sort(alternation);
|
||||
alternations.push_back(fmt::to_string(fmt::join(alternation, "&")));
|
||||
}
|
||||
};
|
||||
|
@ -128,7 +128,7 @@ BuildExpression(const std::vector<ciface::Core::DeviceContainer::InputDetection>
|
|||
handle_release();
|
||||
|
||||
// Remove duplicates
|
||||
std::sort(alternations.begin(), alternations.end());
|
||||
std::ranges::sort(alternations);
|
||||
alternations.erase(std::unique(alternations.begin(), alternations.end()), alternations.end());
|
||||
|
||||
return fmt::to_string(fmt::join(alternations, "|"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue