mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
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:
@@ -11,110 +11,6 @@
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
|
||||
$$DEFINE_WITH_BLACKCORE#define WITH_BLACKCORE
|
||||
$$DEFINE_WITH_BLACKSOUND#define WITH_BLACKSOUND
|
||||
$$DEFINE_WITH_BLACKINPUT#define WITH_BLACKINPUT
|
||||
$$DEFINE_WITH_BLACKGUI#define WITH_BLACKGUI
|
||||
$$DEFINE_WITH_SWIFTDATA#define WITH_SWIFTDATA
|
||||
$$DEFINE_WITH_SWIFTGUI#define WITH_SWIFTGUI
|
||||
$$DEFINE_WITH_SWIFTCORE#define WITH_SWIFTCORE
|
||||
$$DEFINE_WITH_FSX#define WITH_FSX
|
||||
$$DEFINE_WITH_P3D#define WITH_P3D
|
||||
$$DEFINE_WITH_FS9#define WITH_FS9
|
||||
$$DEFINE_WITH_FSUIPC#define WITH_FSUIPC
|
||||
$$DEFINE_WITH_XPLANE#define WITH_XPLANE
|
||||
$$DEFINE_SWIFT_VATSIM_SUPPORT#define SWIFT_VATSIM_SUPPORT
|
||||
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithBlackCore()
|
||||
{
|
||||
#ifdef WITH_BLACKCORE
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithBlackSound()
|
||||
{
|
||||
#ifdef WITH_BLACKSOUND
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithBlackInput()
|
||||
{
|
||||
#ifdef WITH_BLACKINPUT
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithFs9Support()
|
||||
{
|
||||
#ifdef WITH_FS9
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithP3DSupport()
|
||||
{
|
||||
#ifdef WITH_P3D
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithFsxSupport()
|
||||
{
|
||||
#ifdef WITH_FSX
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithFsuipcSupport()
|
||||
{
|
||||
#ifdef WITH_FSUIPC
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithXPlaneSupport()
|
||||
{
|
||||
#ifdef WITH_XPLANE
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isCompiledWithGui()
|
||||
{
|
||||
#ifdef WITH_BLACKGUI
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool BlackConfig::CBuildConfig::isVatsimVersion()
|
||||
{
|
||||
#ifdef SWIFT_VATSIM_SUPPORT
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
const QDateTime &BlackConfig::CBuildConfig::getEol()
|
||||
{
|
||||
static const QString eol(\"$$BLACK_EOL\"); // config.pri
|
||||
@@ -156,7 +52,3 @@ const QDateTime &BlackConfig::CBuildConfig::lastCommitTimestamp()
|
||||
static const QDateTime dt = Private::lastCommitTimestampImpl();
|
||||
return dt;
|
||||
}
|
||||
|
||||
int BlackConfig::CBuildConfig::versionMajor() { return $$BLACK_VER_MAJ; }
|
||||
int BlackConfig::CBuildConfig::versionMinor() { return $$BLACK_VER_MIN; }
|
||||
int BlackConfig::CBuildConfig::versionMicro() { return $$BLACK_VER_MIC; }
|
||||
|
||||
Reference in New Issue
Block a user