Added constexpr specifier where possible in CBuildConfig.

This necessitated moving some function definitions into a .inc file
that is included by buildconfig.h, as constexpr functions must be defined
in the header. This new file is added to the list of QMAKE_SUBSTITUTES.
This commit is contained in:
Mat Sutcliffe
2018-11-03 22:48:07 +00:00
parent 87552c2327
commit 188d3d914e
7 changed files with 241 additions and 195 deletions

View File

@@ -24,16 +24,6 @@
namespace BlackConfig
{
bool CBuildConfig::isCompiledWithMsFlightSimulatorSupport()
{
return CBuildConfig::isCompiledWithFs9Support() || CBuildConfig::isCompiledWithFsxSupport() || CBuildConfig::isCompiledWithP3DSupport();
}
bool CBuildConfig::isCompiledWithFlightSimulatorSupport()
{
return CBuildConfig::isCompiledWithFsxSupport() || CBuildConfig::isCompiledWithXPlaneSupport();
}
const QString &CBuildConfig::swiftGuiExecutableName()
{
static const QString s("swiftguistd");
@@ -59,16 +49,6 @@ namespace BlackConfig
executable == CBuildConfig::swiftGuiExecutableName();
}
bool CBuildConfig::isRunningOnWindowsNtPlatform()
{
#ifdef Q_OS_WIN
// QSysInfo::WindowsVersion only available on Win platforms
return (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based);
#else
return false;
#endif
}
bool CBuildConfig::isRunningOnWindows10()
{
#ifdef Q_OS_WIN
@@ -80,29 +60,6 @@ namespace BlackConfig
#endif
}
bool CBuildConfig::isRunningOnMacOSPlatform()
{
#ifdef Q_OS_MACOS
return true;
#else
return false;
#endif
}
bool CBuildConfig::isRunningOnLinuxPlatform()
{
#ifdef Q_OS_LINUX
return true;
#else
return false;
#endif
}
bool CBuildConfig::isRunningOnUnixPlatform()
{
return CBuildConfig::isRunningOnMacOSPlatform() || CBuildConfig::isRunningOnLinuxPlatform();
}
const QString &CBuildConfig::getPlatformString()
{
static const QString p([]
@@ -119,24 +76,6 @@ namespace BlackConfig
return p;
}
bool CBuildConfig::isDebugBuild()
{
#ifdef QT_DEBUG
return true;
#else
return false;
#endif
}
bool CBuildConfig::isReleaseBuild()
{
#ifdef QT_NO_DEBUG
return true;
#else
return false;
#endif
}
namespace Private
{
bool isLocalDeveloperBuildImpl()