Merge pull request #13093 from mitaclaw/ranges-modernization-4-projection

Ranges Algorithms Modernization - Projection
This commit is contained in:
JMC47
2025-03-23 15:56:13 -04:00
committed by GitHub
36 changed files with 128 additions and 176 deletions

View File

@ -485,10 +485,7 @@ static bool Pack(const std::function<bool()>& cancelled, const File::FSTEntry& e
static void SortFST(File::FSTEntry* root)
{
std::sort(root->children.begin(), root->children.end(),
[](const File::FSTEntry& lhs, const File::FSTEntry& rhs) {
return lhs.virtualName < rhs.virtualName;
});
std::ranges::sort(root->children, {}, &File::FSTEntry::virtualName);
for (auto& child : root->children)
SortFST(&child);
}