From 9cac24633706f6fb21b0bb5dfe3cc277617442fc Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Fri, 12 Dec 2025 23:25:29 +0100 Subject: [PATCH] Use ranges::replace --- components/files/wineutils.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/files/wineutils.hpp b/components/files/wineutils.hpp index aaf7835064..5cd8eea37f 100644 --- a/components/files/wineutils.hpp +++ b/components/files/wineutils.hpp @@ -39,8 +39,7 @@ namespace Files::Wine std::string mwpath = line.substr(keyStart.size(), line.rfind('"') - keyStart.size()); if (mwpath.empty()) break; - std::transform( - mwpath.begin(), mwpath.end(), mwpath.begin(), [](char c) { return c == '\\' ? '/' : c; }); + std::ranges::replace(mwpath, '\\', '/'); // Change drive letter to lowercase, so we could use ~/.wine/dosdevices symlinks mwpath[0] = Misc::StringUtils::toLower(mwpath[0]); std::filesystem::path installPath = homePath / ".wine/dosdevices/" / mwpath;