mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-06 02:16:04 +08:00
Corrected alignment of COptional::m_bytes.
This commit is contained in:
@@ -100,7 +100,7 @@ namespace BlackMisc
|
|||||||
#else
|
#else
|
||||||
T &dereference() { Q_ASSERT(m_isValid); return *reinterpret_cast<T *>(m_bytes); }
|
T &dereference() { Q_ASSERT(m_isValid); return *reinterpret_cast<T *>(m_bytes); }
|
||||||
const T &dereference() const { Q_ASSERT(m_isValid); return *reinterpret_cast<const T *>(m_bytes); }
|
const T &dereference() const { Q_ASSERT(m_isValid); return *reinterpret_cast<const T *>(m_bytes); }
|
||||||
char m_bytes[sizeof(T)];
|
typename std::aligned_storage<sizeof(T)>::type m_bytes[1];
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user