Merge pull request #13091 from mitaclaw/ranges-modernization-2-returns

Ranges Algorithms Modernization - Return
This commit is contained in:
JMC47
2024-12-20 12:50:19 -05:00
committed by GitHub
7 changed files with 15 additions and 16 deletions

View File

@ -309,11 +309,9 @@ void Settings::RemovePath(const QString& qpath)
std::string path = qpath.toStdString();
std::vector<std::string> 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);
}