qarraydata.h: use __has_builtin directly
All our supported compilers support __has_builtin; also, no need to check for old GCC versions; we require at least GCC 8. Change-Id: I86d955188e71d6da5ebd1b2455e0f7fad8072bfb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
a4ea58bf04
commit
1687f4c963
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue