mirror of
https://github.com/opencv/opencv.git
synced 2024-11-30 14:29:49 +08:00
Merge pull request #15383 from alalek:fix_15379
This commit is contained in:
commit
114674c3d9
@ -1744,6 +1744,11 @@ Mat_<_Tp>::Mat_(const std::array<_Tp, _Nm>& arr, bool copyData)
|
||||
template<typename _Tp> inline
|
||||
Mat_<_Tp>& Mat_<_Tp>::operator = (const Mat& m)
|
||||
{
|
||||
if (m.empty())
|
||||
{
|
||||
release();
|
||||
return *this;
|
||||
}
|
||||
if( traits::Type<_Tp>::value == m.type() )
|
||||
{
|
||||
Mat::operator = (m);
|
||||
@ -2125,6 +2130,11 @@ Mat_<_Tp>::Mat_(Mat&& m)
|
||||
template<typename _Tp> inline
|
||||
Mat_<_Tp>& Mat_<_Tp>::operator = (Mat&& m)
|
||||
{
|
||||
if (m.empty())
|
||||
{
|
||||
release();
|
||||
return *this;
|
||||
}
|
||||
if( traits::Type<_Tp>::value == m.type() )
|
||||
{
|
||||
Mat::operator = ((Mat&&)m);
|
||||
|
Loading…
Reference in New Issue
Block a user