QSharedPointer: implement move ctor
Change-Id: I46974aa1d056be797db959b547a1516157b598ca Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
9788c0f47c
commit
ad5f6d4326
@ -327,6 +327,12 @@ public:
|
||||
return *this;
|
||||
}
|
||||
#ifdef Q_COMPILER_RVALUE_REFS
|
||||
inline QSharedPointer(QSharedPointer &&other)
|
||||
: value(other.value), d(other.d)
|
||||
{
|
||||
other.d = 0;
|
||||
other.value = 0;
|
||||
}
|
||||
inline QSharedPointer<T> &operator=(QSharedPointer<T> &&other)
|
||||
{
|
||||
swap(other);
|
||||
|
Loading…
Reference in New Issue
Block a user