From ebf7cebc32ac9af28dc2383192b7b14f7aea134f Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Sun, 29 Sep 2024 11:19:05 -0700 Subject: Modernize `std::sort` with ranges --- Source/Core/Common/FileSearch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common/FileSearch.cpp') diff --git a/Source/Core/Common/FileSearch.cpp b/Source/Core/Common/FileSearch.cpp index 31b5e3cd37..4a54c978c9 100644 --- a/Source/Core/Common/FileSearch.cpp +++ b/Source/Core/Common/FileSearch.cpp @@ -97,7 +97,7 @@ std::vector DoFileSearch(const std::vector& 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. -- cgit v1.2.3