diff --git a/Source/Android/jni/AndroidCommon/AndroidCommon.cpp b/Source/Android/jni/AndroidCommon/AndroidCommon.cpp index 25ec479790..a976d573b8 100644 --- a/Source/Android/jni/AndroidCommon/AndroidCommon.cpp +++ b/Source/Android/jni/AndroidCommon/AndroidCommon.cpp @@ -62,7 +62,7 @@ bool IsPathAndroidContent(std::string_view uri) std::string OpenModeToAndroid(std::string mode) { // The 'b' specifier is not supported by Android. Since we're on POSIX, it's fine to just skip it. - mode.erase(std::remove(mode.begin(), mode.end(), 'b')); + std::erase(mode, 'b'); if (mode == "r") return "r"; diff --git a/Source/Core/DolphinQt/Settings.cpp b/Source/Core/DolphinQt/Settings.cpp index 8d4a3513b9..938e892962 100644 --- a/Source/Core/DolphinQt/Settings.cpp +++ b/Source/Core/DolphinQt/Settings.cpp @@ -309,11 +309,9 @@ void Settings::RemovePath(const QString& qpath) std::string path = qpath.toStdString(); std::vector paths = Config::GetIsoPaths(); - auto new_end = std::remove(paths.begin(), paths.end(), path); - if (new_end == paths.end()) + if (std::erase(paths, path) == 0) return; - paths.erase(new_end, paths.end()); Config::SetIsoPaths(paths); emit PathRemoved(qpath); }