QHash: fix compilation with gcc-4.2.1 (Mac OS X)
The anonymous union isn't supported and can be replaced with a reinterpret_cast. Change-Id: Ic76a31f36e61d910db16312d7a6c4bdc728aa825 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
fcd212e7ba
commit
943ae90744
@ -513,15 +513,10 @@ private:
|
|||||||
bool isValidIterator(const iterator &it) const
|
bool isValidIterator(const iterator &it) const
|
||||||
{
|
{
|
||||||
#if defined(QT_DEBUG) && !defined(Q_HASH_NO_ITERATOR_DEBUG)
|
#if defined(QT_DEBUG) && !defined(Q_HASH_NO_ITERATOR_DEBUG)
|
||||||
union {
|
QHashData::Node *node = it.i;
|
||||||
QHashData *iteratorHashData;
|
|
||||||
QHashData::Node *node;
|
|
||||||
};
|
|
||||||
node = it.i;
|
|
||||||
while (node->next)
|
while (node->next)
|
||||||
node = node->next;
|
node = node->next;
|
||||||
|
return (static_cast<void *>(node) == d);
|
||||||
return (iteratorHashData == d);
|
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(it);
|
Q_UNUSED(it);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user