diff --git a/Source/Core/Common/FileSearch.cpp b/Source/Core/Common/FileSearch.cpp index 4a54c978c9..a92c50f7d1 100644 --- a/Source/Core/Common/FileSearch.cpp +++ b/Source/Core/Common/FileSearch.cpp @@ -98,7 +98,8 @@ std::vector DoFileSearch(const std::vector& directorie // not because std::filesystem returns duplicates). Also note that this pathname-based uniqueness // isn't as thorough as std::filesystem::equivalent. std::ranges::sort(result); - result.erase(std::unique(result.begin(), result.end()), result.end()); + const auto unique_result = std::ranges::unique(result); + result.erase(unique_result.begin(), unique_result.end()); // Dolphin expects to be able to use "/" (DIR_SEP) everywhere. // std::filesystem uses the OS separator. diff --git a/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp b/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp index 1877e8294c..b50621bc92 100644 --- a/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp +++ b/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp @@ -129,7 +129,8 @@ BuildExpression(const std::vector // Remove duplicates std::ranges::sort(alternations); - alternations.erase(std::unique(alternations.begin(), alternations.end()), alternations.end()); + const auto unique_result = std::ranges::unique(alternations); + alternations.erase(unique_result.begin(), unique_result.end()); return fmt::to_string(fmt::join(alternations, "|")); }