diff options
Diffstat (limited to 'src/corelib/kernel/qvariant.h')
-rw-r--r-- | src/corelib/kernel/qvariant.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index b2b72523a9..6080c25f0d 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -426,14 +426,15 @@ class Q_CORE_EXPORT QVariant { static constexpr size_t MaxInternalSize = 3*sizeof(void *); template<typename T> - static constexpr bool CanUseInternalSpace = (sizeof(T) <= MaxInternalSize && alignof(T) <= alignof(void *)); + static constexpr bool CanUseInternalSpace = (sizeof(T) <= MaxInternalSize && alignof(T) <= alignof(double)); static constexpr bool canUseInternalSpace(size_t s, size_t align) - { return s <= MaxInternalSize && align <= alignof(void *); } + { return s <= MaxInternalSize && align <= alignof(double); } union { uchar data[MaxInternalSize] = {}; PrivateShared *shared; + double _forAlignment; // we want an 8byte alignment on 32bit systems as well } data; quintptr is_shared : 1; quintptr is_null : 1; |