Modernize std::replace with ranges

This commit is contained in:
mitaclaw
2024-09-29 11:08:08 -07:00
parent 72436a0d1f
commit 0a80243a92
5 changed files with 6 additions and 6 deletions

View File

@ -446,7 +446,7 @@ FSTEntry ScanDirectoryTree(std::string directory, bool recursive)
// about with directory separators (for host paths - emulated paths may require it) and instead
// use fs::path to interact with them.
auto wpath = path.wstring();
std::replace(wpath.begin(), wpath.end(), L'\\', L'/');
std::ranges::replace(wpath, L'\\', L'/');
return WStringToUTF8(wpath);
#else
return PathToString(path);