QArrayDataPointer: use move and swap in move assignment
Not plain swap; QADP does not hold just memory but arbitrary state (depending on T). Change-Id: I3560577e4109607a51b2c72b67e22e38813977b3 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
6758f73bb7
commit
8a13aa0e02
@ -103,7 +103,8 @@ public:
|
||||
|
||||
QArrayDataPointer &operator=(QArrayDataPointer &&other) noexcept
|
||||
{
|
||||
this->swap(other);
|
||||
QArrayDataPointer moved(std::move(other));
|
||||
swap(moved);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user