mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
Ref T419, utility function if canRunOnCurrentPlatform"
This commit is contained in:
committed by
Mat Sutcliffe
parent
d1b4660b20
commit
c60692605d
@@ -192,6 +192,15 @@ namespace BlackMisc
|
||||
return platform == CPlatform::currentPlatform();
|
||||
}
|
||||
|
||||
bool CPlatform::canRunOnCurrentPlatform(const CPlatform &platform)
|
||||
{
|
||||
if (platform == currentPlatform()) { return true; }
|
||||
if (platform.isAnyWindows() && currentPlatform().isAnyWindows()) { return true; }
|
||||
if (platform == CPlatform::allOs()) { return true; }
|
||||
if (platform == CPlatform::independent()) { return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
const CPlatform &CPlatform::win32Platform()
|
||||
{
|
||||
static const CPlatform p(Win32);
|
||||
|
||||
Reference in New Issue
Block a user