fixes for MSVS compiler optimizer

pull/5201/head
Alexander Alekhin 10 years ago
parent ac37b77452
commit e65de8d1da
  1. 5
      modules/core/include/opencv2/core/mat.inl.hpp

@ -1746,12 +1746,13 @@ Mat_<_Tp>& Mat_<_Tp>::operator = (Mat&& m)
{ {
if( DataType<_Tp>::type == m.type() ) if( DataType<_Tp>::type == m.type() )
{ {
Mat::operator = (m); Mat::operator = ((Mat&&)m);
return *this; return *this;
} }
if( DataType<_Tp>::depth == m.depth() ) if( DataType<_Tp>::depth == m.depth() )
{ {
return (*this = m.reshape(DataType<_Tp>::channels, m.dims, 0)); Mat::operator = ((Mat&&)m.reshape(DataType<_Tp>::channels, m.dims, 0));
return *this;
} }
CV_DbgAssert(DataType<_Tp>::channels == m.channels()); CV_DbgAssert(DataType<_Tp>::channels == m.channels());
m.convertTo(*this, type()); m.convertTo(*this, type());

Loading…
Cancel
Save