Clang: Use C++ condition instead of preprocessor

It is now possible to refactor the code. This pattern is favorable to the
preprocessor.

Change-Id: Ic85db43e23e16412d938a47892f1812b5883d949
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-02-13 14:03:22 +01:00
parent 1a4c51d15f
commit 157c74e1f1

View File

@@ -57,9 +57,8 @@ Utils::PathString fromNativePath(const llvm::SmallString<256> &string)
{
Utils::PathString path(string.data(), string.size());
#ifdef _WIN32
std::replace(path.begin(), path.end(), '\\', '/');
#endif
if (Utils::HostOsInfo::isWindowsHost())
std::replace(path.begin(), path.end(), '\\', '/');
return path;
}