mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55: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))
|
||||
{
|
||||
case Win32: return CPlatform::win32();
|
||||
case Win64: return CPlatform::win64();
|
||||
case Linux: return CPlatform::linux();
|
||||
case MacOS: return CPlatform::macOS();
|
||||
case Win32: return CPlatform::win32Platform();
|
||||
case Win64: return CPlatform::win64Platform();
|
||||
case Linux: return CPlatform::linuxPlatform();
|
||||
case MacOS: return CPlatform::macOSPlatform();
|
||||
default: break;
|
||||
}
|
||||
return unknownOs();
|
||||
@@ -167,11 +167,11 @@ namespace BlackMisc
|
||||
if (CBuildConfig::isRunningOnWindowsNtPlatform())
|
||||
{
|
||||
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::isRunningOnMacOSPlatform()) { return CPlatform::macOS(); }
|
||||
if (CBuildConfig::isRunningOnLinuxPlatform()) { return CPlatform::linuxPlatform(); }
|
||||
if (CBuildConfig::isRunningOnMacOSPlatform()) { return CPlatform::macOSPlatform(); }
|
||||
return CPlatform::unknownOs();
|
||||
}
|
||||
}
|
||||
@@ -182,25 +182,25 @@ namespace BlackMisc
|
||||
return p;
|
||||
}
|
||||
|
||||
const CPlatform &CPlatform::win32()
|
||||
const CPlatform &CPlatform::win32Platform()
|
||||
{
|
||||
static const CPlatform p(Win32);
|
||||
return p;
|
||||
}
|
||||
|
||||
const CPlatform &CPlatform::win64()
|
||||
const CPlatform &CPlatform::win64Platform()
|
||||
{
|
||||
static const CPlatform p(Win64);
|
||||
return p;
|
||||
}
|
||||
|
||||
const CPlatform &CPlatform::linux()
|
||||
const CPlatform &CPlatform::linuxPlatform()
|
||||
{
|
||||
static const CPlatform p(Linux);
|
||||
return p;
|
||||
}
|
||||
|
||||
const CPlatform &CPlatform::macOS()
|
||||
const CPlatform &CPlatform::macOSPlatform()
|
||||
{
|
||||
static const CPlatform p(MacOS);
|
||||
return p;
|
||||
|
||||
@@ -120,16 +120,16 @@ namespace BlackMisc
|
||||
static const CPlatform ¤tPlatform();
|
||||
|
||||
//! Win32
|
||||
static const CPlatform &win32();
|
||||
static const CPlatform &win32Platform();
|
||||
|
||||
//! Win64
|
||||
static const CPlatform &win64();
|
||||
static const CPlatform &win64Platform();
|
||||
|
||||
//! Linux
|
||||
static const CPlatform &linux();
|
||||
static const CPlatform &linuxPlatform();
|
||||
|
||||
//! Mac OS
|
||||
static const CPlatform &macOS();
|
||||
static const CPlatform &macOSPlatform();
|
||||
|
||||
//! Unknown OS
|
||||
static const CPlatform &unknownOs();
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace BlackMisc
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user