Merge "qarraydata.h: use __has_builtin directly"

This commit is contained in:
Fabian Kosmale 2021-03-20 19:23:53 +01:00 committed by Qt CI Bot
commit 5da3f1e4b6

View File

@ -139,7 +139,7 @@ struct QTypedArrayData
static_assert(sizeof(QTypedArrayData) == sizeof(QArrayData));
QArrayData *d;
void *result = QArrayData::allocate(&d, sizeof(T), alignof(AlignmentDummy), capacity, option);
#if (defined(Q_CC_GNU) && Q_CC_GNU >= 407) || QT_HAS_BUILTIN(__builtin_assume_aligned)
#if __has_builtin(__builtin_assume_aligned)
result = __builtin_assume_aligned(result, Q_ALIGNOF(AlignmentDummy));
#endif
return qMakePair(static_cast<QTypedArrayData *>(d), static_cast<T *>(result));