Fix for compiler specific code.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-08-21 23:04:23 +03:00
parent 50e3e4e9d7
commit 9cd3fc8bcb
3 changed files with 12 additions and 12 deletions

View File

@ -53,12 +53,12 @@ public:
static const QString PatternMaxVerStr;
static const QString CurrentSchema;
// GCC 4.6 doesn't allow constexpr and const together
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 406
static Q_DECL_CONSTEXPR const int PatternMinVer = CONVERTER_VERSION_CHECK(0, 1, 0);
static Q_DECL_CONSTEXPR const int PatternMaxVer = CONVERTER_VERSION_CHECK(0, 3, 3);
#else
#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) <= 406
static Q_DECL_CONSTEXPR int PatternMinVer = CONVERTER_VERSION_CHECK(0, 1, 0);
static Q_DECL_CONSTEXPR int PatternMaxVer = CONVERTER_VERSION_CHECK(0, 3, 3);
#else
static Q_DECL_CONSTEXPR const int PatternMinVer = CONVERTER_VERSION_CHECK(0, 1, 0);
static Q_DECL_CONSTEXPR const int PatternMaxVer = CONVERTER_VERSION_CHECK(0, 3, 3);
#endif
protected:

View File

@ -49,12 +49,12 @@ public:
static const QString MeasurementMaxVerStr;
static const QString CurrentSchema;
// GCC 4.6 doesn't allow constexpr and const together
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 406
static Q_DECL_CONSTEXPR const int MeasurementMinVer = CONVERTER_VERSION_CHECK(0, 2, 0);
static Q_DECL_CONSTEXPR const int MeasurementMaxVer = CONVERTER_VERSION_CHECK(0, 3, 3);
#else
#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) <= 406
static Q_DECL_CONSTEXPR int MeasurementMinVer = CONVERTER_VERSION_CHECK(0, 2, 0);
static Q_DECL_CONSTEXPR int MeasurementMaxVer = CONVERTER_VERSION_CHECK(0, 3, 3);
#else
static Q_DECL_CONSTEXPR const int MeasurementMinVer = CONVERTER_VERSION_CHECK(0, 2, 0);
static Q_DECL_CONSTEXPR const int MeasurementMaxVer = CONVERTER_VERSION_CHECK(0, 3, 3);
#endif
protected:

View File

@ -49,12 +49,12 @@ public:
static const QString MeasurementMaxVerStr;
static const QString CurrentSchema;
// GCC 4.6 doesn't allow constexpr and const together
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 406
static Q_DECL_CONSTEXPR const int MeasurementMinVer = CONVERTER_VERSION_CHECK(0, 3, 0);
static Q_DECL_CONSTEXPR const int MeasurementMaxVer = CONVERTER_VERSION_CHECK(0, 4, 2);
#else
#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) <= 406
static Q_DECL_CONSTEXPR int MeasurementMinVer = CONVERTER_VERSION_CHECK(0, 3, 0);
static Q_DECL_CONSTEXPR int MeasurementMaxVer = CONVERTER_VERSION_CHECK(0, 4, 2);
#else
static Q_DECL_CONSTEXPR const int MeasurementMinVer = CONVERTER_VERSION_CHECK(0, 3, 0);
static Q_DECL_CONSTEXPR const int MeasurementMaxVer = CONVERTER_VERSION_CHECK(0, 4, 2);
#endif
protected: