diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-10-28 11:47:35 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-10-28 14:27:45 (GMT) |
commit | 5b4b6b2be7b901ef9a29c37431998034730fa3d3 (patch) | |
tree | 9dd31b2f0af3f23462575c02f17eb33bdf9bb7e0 /src/corelib/tools/qhash.cpp | |
parent | e83bb2fdfc2dc899526c8157fd8b77a68cdde9da (diff) | |
download | Qt-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/qhash.cpp')
-rw-r--r-- | src/corelib/tools/qhash.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 23fff1c..c82c389 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -166,7 +166,7 @@ static int countBits(int hint) const int MinNumBits = 4; QHashData QHashData::shared_null = { - 0, 0, Q_BASIC_ATOMIC_INITIALIZER(1), 0, 0, MinNumBits, 0, 0, true, false + 0, 0, Q_BASIC_ATOMIC_INITIALIZER(1), 0, 0, MinNumBits, 0, 0, true, false, 0 }; void *QHashData::allocateNode() @@ -214,6 +214,7 @@ QHashData *QHashData::detach_helper2(void (*node_duplicate)(Node *, void *), d->numBuckets = numBuckets; d->sharable = true; d->strictAlignment = nodeAlign > 8; + d->reserved = 0; if (numBuckets) { QT_TRY { |