equal
deleted
inserted
replaced
587 |
587 |
588 template <class Key, class T> |
588 template <class Key, class T> |
589 Q_INLINE_TEMPLATE QHash<Key, T> &QHash<Key, T>::operator=(const QHash<Key, T> &other) |
589 Q_INLINE_TEMPLATE QHash<Key, T> &QHash<Key, T>::operator=(const QHash<Key, T> &other) |
590 { |
590 { |
591 if (d != other.d) { |
591 if (d != other.d) { |
592 other.d->ref.ref(); |
592 QHashData *o = other.d; |
|
593 o->ref.ref(); |
593 if (!d->ref.deref()) |
594 if (!d->ref.deref()) |
594 freeData(d); |
595 freeData(d); |
595 d = other.d; |
596 d = o; |
596 if (!d->sharable) |
597 if (!d->sharable) |
597 detach_helper(); |
598 detach_helper(); |
598 } |
599 } |
599 return *this; |
600 return *this; |
600 } |
601 } |