summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvector.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-10-28 11:47:35 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-10-28 14:27:45 (GMT)
commit5b4b6b2be7b901ef9a29c37431998034730fa3d3 (patch)
tree9dd31b2f0af3f23462575c02f17eb33bdf9bb7e0 /src/corelib/tools/qvector.h
parente83bb2fdfc2dc899526c8157fd8b77a68cdde9da (diff)
downloadQt-5b4b6b2be7b901ef9a29c37431998034730fa3d3.zip
Qt-5b4b6b2be7b901ef9a29c37431998034730fa3d3.tar.gz
Qt-5b4b6b2be7b901ef9a29c37431998034730fa3d3.tar.bz2
Initialise the reserved bits to 0.
This is future compatibility: we must rely on them being 0 in older versions of Qt. Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'src/corelib/tools/qvector.h')
-rw-r--r--src/corelib/tools/qvector.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index cf7df12..7402d77 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -72,6 +72,7 @@ struct Q_CORE_EXPORT QVectorData
#else
uint sharable : 1;
uint capacity : 1;
+ uint reserved : 30;
#endif
static QVectorData shared_null;
@@ -486,6 +487,7 @@ void QVector<T>::realloc(int asize, int aalloc)
x.d->alloc = aalloc;
x.d->sharable = true;
x.d->capacity = d->capacity;
+ x.d->reserved = 0;
}
if (QTypeInfo<T>::isComplex) {