forked from qt-creator/qt-creator
Replace WIN32 define with _WIN32
Only MinGW gcc defines WIN32, MSVC compiler does not. It's also defined by qmake (msvc-desktop.conf), but not by qbs ... Let's just use _WIN32, that's defined everywhere. Change-Id: I8342a70498be54a965dcf7fae63eaf406aaa3c04 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -35,7 +35,7 @@ namespace ClangBackEnd {
|
||||
using USRName = llvm::SmallVector<char, 128>;
|
||||
|
||||
// use std::filesystem::path if it is supported by all compilers
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
const char nativeSeperator = '\\';
|
||||
#else
|
||||
const char nativeSeperator = '/';
|
||||
|
||||
@@ -58,7 +58,7 @@ Utils::SmallString fromNativePath(Container container)
|
||||
{
|
||||
Utils::SmallString path(container.data(), container.size());
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
std::replace(path.begin(), path.end(), '\\', '/');
|
||||
#endif
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace {
|
||||
|
||||
std::string toNativePath(std::string &&path)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
std::replace(path.begin(), path.end(), '/', '\\');
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user