summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvector.h
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-07-15 17:30:46 +0200
committerThierry Bastian <thierry.bastian@nokia.com>2009-07-15 17:31:32 +0200
commite68aa748a35725e3a6028ebc75a8447eff0912cb (patch)
treed589c7abfb67664d22e53627ed895d5ccaa86217 /src/corelib/tools/qvector.h
parent87448acc08b48d3f6185ee57248a4e7ba912c949 (diff)
avoids strict-antialiasing breakage warnings
Diffstat (limited to 'src/corelib/tools/qvector.h')
-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 19b8da479c..51a6709648 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();
}