summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qhash.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qhash.h')
-rw-r--r--src/corelib/tools/qhash.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 25029afe1f..ce9ab33903 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -513,15 +513,10 @@ private:
bool isValidIterator(const iterator &it) const
{
#if defined(QT_DEBUG) && !defined(Q_HASH_NO_ITERATOR_DEBUG)
- union {
- QHashData *iteratorHashData;
- QHashData::Node *node;
- };
- node = it.i;
+ QHashData::Node *node = it.i;
while (node->next)
node = node->next;
-
- return (iteratorHashData == d);
+ return (static_cast<void *>(node) == d);
#else
Q_UNUSED(it);
return true;