Merge "qarraydata.h: use __has_builtin directly"
This commit is contained in:
commit
5da3f1e4b6
@ -139,7 +139,7 @@ struct QTypedArrayData
|
|||||||
static_assert(sizeof(QTypedArrayData) == sizeof(QArrayData));
|
static_assert(sizeof(QTypedArrayData) == sizeof(QArrayData));
|
||||||
QArrayData *d;
|
QArrayData *d;
|
||||||
void *result = QArrayData::allocate(&d, sizeof(T), alignof(AlignmentDummy), capacity, option);
|
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));
|
result = __builtin_assume_aligned(result, Q_ALIGNOF(AlignmentDummy));
|
||||||
#endif
|
#endif
|
||||||
return qMakePair(static_cast<QTypedArrayData *>(d), static_cast<T *>(result));
|
return qMakePair(static_cast<QTypedArrayData *>(d), static_cast<T *>(result));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user