forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user