Change-Id: I5fa2fae19126bea60b9682ed7765681dd6da8c15
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
{ if (d) ref(); }
inline QSharedPointer<T> &operator=(const QSharedPointer<T> &other)
{
- internalCopy(other);
+ QSharedPointer copy(other);
+ swap(copy);
return *this;
}
#ifdef Q_COMPILER_RVALUE_REFS
inline QSharedPointer<T> &operator=(QSharedPointer<T> &&other)
{
- QSharedPointer<T>::internalSwap(other);
+ swap(other);
return *this;
}
#endif
}
#endif
- inline void clear() { *this = QSharedPointer<T>(); }
+ inline void clear() { QSharedPointer copy; swap(copy); }
QWeakPointer<T> toWeakRef() const;