summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-07-15 15:30:46 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-07-15 15:31:32 (GMT)
commite68aa748a35725e3a6028ebc75a8447eff0912cb (patch)
treed589c7abfb67664d22e53627ed895d5ccaa86217 /src
parent87448acc08b48d3f6185ee57248a4e7ba912c949 (diff)
downloadQt-e68aa748a35725e3a6028ebc75a8447eff0912cb.zip
Qt-e68aa748a35725e3a6028ebc75a8447eff0912cb.tar.gz
Qt-e68aa748a35725e3a6028ebc75a8447eff0912cb.tar.bz2
avoids strict-antialiasing breakage warnings
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qvector.h4
1 files changed, 3 insertions, 1 deletions
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<T>::free(Data *x)
{
if (QTypeInfo<T>::isComplex) {
T* b = x->array;
- T* i = b + reinterpret_cast<QVectorData *>(x)->size;
+ union { QVectorData *d; Data *p; } u;
+ u.p = x;
+ T* i = b + u.d->size;
while (i-- != b)
i->~T();
}