diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2019-10-21 15:14:13 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2019-10-21 15:41:58 +0200 |
commit | d9c89dffe8e3e6f8ad4ad7fb7abedf1e9d2b7e9a (patch) | |
tree | 9fcd529a2e4932ee5e6d4910410a54682e87c9cc | |
parent | a3acd0d64c68a01a003940b783262e2b0797361a (diff) |
Replace usage of Q_ALIGNOF with alignof
Q_ALIGNOF is no longer needed as alignof is part of the C++11 standard,
and will be removed from Qt 6.
Task-number: QTBUG-76414
Change-Id: I2fdb84de7fa7342c5d032b7679be7ba6bbaf3b40
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4sparsearray.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4sparsearray_p.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index c0dd696b8a..254e1c46e9 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -348,7 +348,7 @@ QT_BEGIN_NAMESPACE #endif #endif -#define MOTH_INSTR_ALIGN_MASK (Q_ALIGNOF(QV4::Moth::Instr) - 1) +#define MOTH_INSTR_ALIGN_MASK (alignof(QV4::Moth::Instr) - 1) #define MOTH_INSTR_ENUM(I) I, I##_Wide, #define MOTH_INSTR_SIZE(I) (sizeof(QV4::Moth::Instr::instr_##I)) diff --git a/src/qml/jsruntime/qv4sparsearray.cpp b/src/qml/jsruntime/qv4sparsearray.cpp index 8930c9a94d..7457e724e2 100644 --- a/src/qml/jsruntime/qv4sparsearray.cpp +++ b/src/qml/jsruntime/qv4sparsearray.cpp @@ -359,7 +359,7 @@ static inline void qMapDeallocate(SparseArrayNode *node, int alignment) SparseArrayNode *SparseArray::createNode(uint sl, SparseArrayNode *parent, bool left) { - SparseArrayNode *node = static_cast<SparseArrayNode *>(qMapAllocate(sizeof(SparseArrayNode), Q_ALIGNOF(SparseArrayNode))); + SparseArrayNode *node = static_cast<SparseArrayNode *>(qMapAllocate(sizeof(SparseArrayNode), alignof(SparseArrayNode))); Q_CHECK_PTR(node); node->p = (quintptr)parent; diff --git a/src/qml/jsruntime/qv4sparsearray_p.h b/src/qml/jsruntime/qv4sparsearray_p.h index c1e50c8dcf..248fcdb02f 100644 --- a/src/qml/jsruntime/qv4sparsearray_p.h +++ b/src/qml/jsruntime/qv4sparsearray_p.h @@ -147,7 +147,7 @@ struct Q_QML_EXPORT SparseArray SparseArray(); ~SparseArray() { if (root()) - freeTree(header.left, Q_ALIGNOF(SparseArrayNode)); + freeTree(header.left, alignof(SparseArrayNode)); } SparseArray(const SparseArray &other); |