Merge pull request #6259 from polevoy-d-v:move_sematics_fix

pull/6261/head
Alexander Alekhin 9 years ago
commit 7783206934
  1. 5
      modules/core/include/opencv2/core/mat.inl.hpp
  2. 3
      modules/core/include/opencv2/core/ptr.inl.hpp

@ -1165,6 +1165,9 @@ Mat::Mat(Mat&& m)
inline
Mat& Mat::operator = (Mat&& m)
{
if (this == &m)
return *this;
release();
flags = m.flags; dims = m.dims; rows = m.rows; cols = m.cols; data = m.data;
datastart = m.datastart; dataend = m.dataend; datalimit = m.datalimit; allocator = m.allocator;
@ -3599,6 +3602,8 @@ UMat::UMat(UMat&& m)
inline
UMat& UMat::operator = (UMat&& m)
{
if (this == &m)
return *this;
release();
flags = m.flags; dims = m.dims; rows = m.rows; cols = m.cols;
allocator = m.allocator; usageFlags = m.usageFlags;

@ -264,6 +264,9 @@ Ptr<T>::Ptr(Ptr&& o) : owner(o.owner), stored(o.stored)
template<typename T>
Ptr<T>& Ptr<T>::operator = (Ptr<T>&& o)
{
if (this == &o)
return *this;
release();
owner = o.owner;
stored = o.stored;

Loading…
Cancel
Save