From e68aa748a35725e3a6028ebc75a8447eff0912cb Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 15 Jul 2009 17:30:46 +0200 Subject: avoids strict-antialiasing breakage warnings --- src/corelib/tools/qvector.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 19b8da4..51a6709 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -415,7 +415,9 @@ void QVector::free(Data *x) { if (QTypeInfo::isComplex) { T* b = x->array; - T* i = b + reinterpret_cast(x)->size; + union { QVectorData *d; Data *p; } u; + u.p = x; + T* i = b + u.d->size; while (i-- != b) i->~T(); } -- cgit v0.12