summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileSearch.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2024-10-15 17:08:55 +0200
committerGitHub <noreply@github.com>2024-10-15 17:08:55 +0200
commit07605bf67c6815510688ebf3e71583624c3bfab0 (patch)
tree45d3c7260daf088cbf44febda937f1a4c34c5141 /Source/Core/Common/FileSearch.cpp
parentef8b753cd778179e1c2980b1ec2615f80a314714 (diff)
parente572081ac322253d65bf767a88887fedd4e97c2e (diff)
Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivial
Ranges Algorithms Modernization - Trivial
Diffstat (limited to 'Source/Core/Common/FileSearch.cpp')
-rw-r--r--Source/Core/Common/FileSearch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/FileSearch.cpp b/Source/Core/Common/FileSearch.cpp
index d022414efc..4a54c978c9 100644
--- a/Source/Core/Common/FileSearch.cpp
+++ b/Source/Core/Common/FileSearch.cpp
@@ -97,7 +97,7 @@ std::vector<std::string> DoFileSearch(const std::vector<std::string>& directorie
// Remove duplicates (occurring because caller gave e.g. duplicate or overlapping directories -
// not because std::filesystem returns duplicates). Also note that this pathname-based uniqueness
// isn't as thorough as std::filesystem::equivalent.
- std::sort(result.begin(), result.end());
+ std::ranges::sort(result);
result.erase(std::unique(result.begin(), result.end()), result.end());
// Dolphin expects to be able to use "/" (DIR_SEP) everywhere.
@@ -107,7 +107,7 @@ std::vector<std::string> DoFileSearch(const std::vector<std::string>& directorie
if constexpr (os_separator != DIR_SEP_CHR)
{
for (auto& path : result)
- std::replace(path.begin(), path.end(), '\\', DIR_SEP_CHR);
+ std::ranges::replace(path, '\\', DIR_SEP_CHR);
}
return result;