QVLA: use std::aligned_storage
Remove the hand-rolled union used only to achieve alignment. Change-Id: I8e635fa0d09042f30fd67d589db9bc384c0ec8ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
1ecc884bfd
commit
20848f6e83
@ -293,11 +293,7 @@ private:
|
||||
qsizetype a; // capacity
|
||||
qsizetype s; // size
|
||||
T *ptr; // data
|
||||
union {
|
||||
char array[Prealloc * sizeof(T)];
|
||||
qint64 q_for_alignment_1;
|
||||
double q_for_alignment_2;
|
||||
};
|
||||
std::aligned_storage_t<sizeof(T), alignof(T)> array[Prealloc];
|
||||
|
||||
bool isValidIterator(const const_iterator &i) const
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user