diff --git a/src/corelib/tools/qhashfunctions.h b/src/corelib/tools/qhashfunctions.h index f34c26d4985..273a211a990 100644 --- a/src/corelib/tools/qhashfunctions.h +++ b/src/corelib/tools/qhashfunctions.h @@ -139,7 +139,7 @@ Q_DECL_CONST_FUNCTION constexpr inline size_t qHash(qint64 key, size_t seed = 0) } return qHash(quint64(key), seed); } -#if QT_SUPPORTS_INT128 +#ifdef QT_SUPPORTS_INT128 constexpr size_t qHash(quint128 key, size_t seed = 0) noexcept { return qHash(quint64(key + (key >> 64)), seed); diff --git a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp index 5f1ff673169..07507ae6ae4 100644 --- a/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp +++ b/tests/auto/corelib/global/qfloat16/tst_qfloat16.cpp @@ -214,7 +214,7 @@ void tst_qfloat16::ordering() CHECK_INT(qint16); CHECK_INT(qint32); CHECK_INT(qint64); -#if QT_SUPPORTS_INT128 +#ifdef QT_SUPPORTS_INT128 CHECK_INT(qint128); #endif if (right >= 0) { @@ -224,7 +224,7 @@ void tst_qfloat16::ordering() CHECK_INT(quint16); CHECK_INT(quint32); CHECK_INT(quint64); - #if QT_SUPPORTS_INT128 + #ifdef QT_SUPPORTS_INT128 CHECK_INT(quint128); #endif } diff --git a/tests/auto/corelib/global/qglobal/qglobal.c b/tests/auto/corelib/global/qglobal/qglobal.c index 2cfbd5e3be0..c133ad97fc3 100644 --- a/tests/auto/corelib/global/qglobal/qglobal.c +++ b/tests/auto/corelib/global/qglobal/qglobal.c @@ -59,7 +59,7 @@ void tst_GlobalTypes() #endif /* QT_SUPPORTS_INT128 */ } -#if QT_SUPPORTS_INT128 +#ifdef QT_SUPPORTS_INT128 qint128 tst_qint128_min() { return Q_INT128_MIN + 0; } qint128 tst_qint128_max() { return 0 + Q_INT128_MAX; } quint128 tst_quint128_max() { return Q_UINT128_MAX - 1 + 1; } diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp index 7dd027160ed..954eab6a43a 100644 --- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp +++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp @@ -103,7 +103,7 @@ extern "C" { // functions in qglobal.c void tst_GlobalTypes(); int tst_QtVersion(); const char *tst_qVersion(); -#if QT_SUPPORTS_INT128 +#ifdef QT_SUPPORTS_INT128 qint128 tst_qint128_min(); qint128 tst_qint128_max(); quint128 tst_quint128_max(); diff --git a/tests/auto/corelib/global/qtendian/tst_qtendian.cpp b/tests/auto/corelib/global/qtendian/tst_qtendian.cpp index 8e50b2bd088..6574c80ddf6 100644 --- a/tests/auto/corelib/global/qtendian/tst_qtendian.cpp +++ b/tests/auto/corelib/global/qtendian/tst_qtendian.cpp @@ -7,7 +7,7 @@ #include #include -#if QT_SUPPORTS_INT128 +#ifdef QT_SUPPORTS_INT128 #define ONLY_INT128(...) __VA_ARGS__ #else #define ONLY_INT128(...) diff --git a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp index beb3eb36c49..34ccd56e1d7 100644 --- a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp +++ b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp @@ -169,7 +169,7 @@ static void unsignedIntegerConsistency(quint64 value, size_t seed) if (v32 == value) QCOMPARE(hu64, hu32); -#if QT_SUPPORTS_INT128 +#ifdef QT_SUPPORTS_INT128 const auto hu128 = qHash(quint128(value), seed); QCOMPARE(hu128, hu64); #endif @@ -216,7 +216,7 @@ void tst_QHashFunctions::signedIntegerConsistency() QCOMPARE(hs64, hs32); } -#if QT_SUPPORTS_INT128 +#ifdef QT_SUPPORTS_INT128 const auto hs128 = qHash(qint128(value), seed); QCOMPARE(hs128, hs64); #endif