mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 19:35:33 +08:00
Ref T203, fixed gcc issue
static const CPlatform &linux() platform.h:129:33: error: expected unqualified-id before numeric constant
This commit is contained in:
@@ -151,10 +151,10 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
switch (stringToPlatform(str))
|
switch (stringToPlatform(str))
|
||||||
{
|
{
|
||||||
case Win32: return CPlatform::win32();
|
case Win32: return CPlatform::win32Platform();
|
||||||
case Win64: return CPlatform::win64();
|
case Win64: return CPlatform::win64Platform();
|
||||||
case Linux: return CPlatform::linux();
|
case Linux: return CPlatform::linuxPlatform();
|
||||||
case MacOS: return CPlatform::macOS();
|
case MacOS: return CPlatform::macOSPlatform();
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
return unknownOs();
|
return unknownOs();
|
||||||
@@ -167,11 +167,11 @@ namespace BlackMisc
|
|||||||
if (CBuildConfig::isRunningOnWindowsNtPlatform())
|
if (CBuildConfig::isRunningOnWindowsNtPlatform())
|
||||||
{
|
{
|
||||||
const int wordSize = CBuildConfig::buildWordSize();
|
const int wordSize = CBuildConfig::buildWordSize();
|
||||||
return wordSize == 64 ? CPlatform::win64() : CPlatform::win32();
|
return wordSize == 64 ? CPlatform::win64Platform() : CPlatform::win32Platform();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CBuildConfig::isRunningOnLinuxPlatform()) { return CPlatform::linux(); }
|
if (CBuildConfig::isRunningOnLinuxPlatform()) { return CPlatform::linuxPlatform(); }
|
||||||
if (CBuildConfig::isRunningOnMacOSPlatform()) { return CPlatform::macOS(); }
|
if (CBuildConfig::isRunningOnMacOSPlatform()) { return CPlatform::macOSPlatform(); }
|
||||||
return CPlatform::unknownOs();
|
return CPlatform::unknownOs();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -182,25 +182,25 @@ namespace BlackMisc
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CPlatform &CPlatform::win32()
|
const CPlatform &CPlatform::win32Platform()
|
||||||
{
|
{
|
||||||
static const CPlatform p(Win32);
|
static const CPlatform p(Win32);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CPlatform &CPlatform::win64()
|
const CPlatform &CPlatform::win64Platform()
|
||||||
{
|
{
|
||||||
static const CPlatform p(Win64);
|
static const CPlatform p(Win64);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CPlatform &CPlatform::linux()
|
const CPlatform &CPlatform::linuxPlatform()
|
||||||
{
|
{
|
||||||
static const CPlatform p(Linux);
|
static const CPlatform p(Linux);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CPlatform &CPlatform::macOS()
|
const CPlatform &CPlatform::macOSPlatform()
|
||||||
{
|
{
|
||||||
static const CPlatform p(MacOS);
|
static const CPlatform p(MacOS);
|
||||||
return p;
|
return p;
|
||||||
|
|||||||
@@ -120,16 +120,16 @@ namespace BlackMisc
|
|||||||
static const CPlatform ¤tPlatform();
|
static const CPlatform ¤tPlatform();
|
||||||
|
|
||||||
//! Win32
|
//! Win32
|
||||||
static const CPlatform &win32();
|
static const CPlatform &win32Platform();
|
||||||
|
|
||||||
//! Win64
|
//! Win64
|
||||||
static const CPlatform &win64();
|
static const CPlatform &win64Platform();
|
||||||
|
|
||||||
//! Linux
|
//! Linux
|
||||||
static const CPlatform &linux();
|
static const CPlatform &linuxPlatform();
|
||||||
|
|
||||||
//! Mac OS
|
//! Mac OS
|
||||||
static const CPlatform &macOS();
|
static const CPlatform &macOSPlatform();
|
||||||
|
|
||||||
//! Unknown OS
|
//! Unknown OS
|
||||||
static const CPlatform &unknownOs();
|
static const CPlatform &unknownOs();
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ namespace BlackMisc
|
|||||||
|
|
||||||
const CPlatformSet &CPlatformSet::allPlatforms()
|
const CPlatformSet &CPlatformSet::allPlatforms()
|
||||||
{
|
{
|
||||||
static const CPlatformSet platforms({ CPlatform::win32(), CPlatform::win64(), CPlatform::linux(), CPlatform::macOS() });
|
static const CPlatformSet platforms({ CPlatform::win32Platform(), CPlatform::win64Platform(), CPlatform::linuxPlatform(), CPlatform::macOSPlatform() });
|
||||||
return platforms;
|
return platforms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user