mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-15 23:52:42 +00:00
Merge pull request #13093 from mitaclaw/ranges-modernization-4-projection
Ranges Algorithms Modernization - Projection
This commit is contained in:
commit
ad3650abfc
36 changed files with 128 additions and 176 deletions
|
@ -165,10 +165,8 @@ std::vector<std::string> GlobalConflicts(std::string_view source)
|
|||
// Sort the conflicts from largest to smallest string
|
||||
// this way we can ensure smaller strings that are a substring
|
||||
// of the larger string are able to be replaced appropriately
|
||||
std::sort(global_result.begin(), global_result.end(),
|
||||
[](const std::string& first, const std::string& second) {
|
||||
return first.size() > second.size();
|
||||
});
|
||||
std::ranges::sort(global_result, std::ranges::greater{},
|
||||
[](const std::string& s) { return s.size(); });
|
||||
return global_result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue