Commit ec06fd0e authored by Marco Bubke's avatar Marco Bubke
Browse files

Clang: Use std::replace instead of std::transform



Change-Id: I60e42577631dee5cf05b1129a49ea36c391e8923
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent a2bf4726
......@@ -44,9 +44,7 @@ namespace {
std::string toNativePath(std::string &&path)
{
#ifdef WIN32
std::transform(path.begin(), path.end(), path.begin(), [] (char sign) {
return sign == '/' ? '\\' : sign;
});
std::replace(path.begin(), path.end(), '/', '\\');
#endif
return std::move(path);
......
......@@ -38,9 +38,7 @@ inline
std::string toNativePath(std::string &&path)
{
#ifdef WIN32
std::transform(path.begin(), path.end(), path.begin(), [] (char sign) {
return sign == '/' ? '\\' : sign;
});
std::replace(path.begin(), path.end(), '/', '\\');
#endif
return std::move(path);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment