From 869ea22f34407998256d9a4a570e30e3ba48feb8 Mon Sep 17 00:00:00 2001 From: Zyrin Date: Wed, 21 Aug 2019 11:12:00 +0200 Subject: [PATCH] Use std::move in Mat_ move constructors --- modules/core/include/opencv2/core/mat.inl.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/include/opencv2/core/mat.inl.hpp b/modules/core/include/opencv2/core/mat.inl.hpp index d74b6e67b2..bfa28a1cdf 100644 --- a/modules/core/include/opencv2/core/mat.inl.hpp +++ b/modules/core/include/opencv2/core/mat.inl.hpp @@ -2103,7 +2103,7 @@ void Mat_<_Tp>::forEach(const Functor& operation) const { template inline Mat_<_Tp>::Mat_(Mat_&& m) - : Mat(m) + : Mat(std::move(m)) { } @@ -2119,7 +2119,7 @@ Mat_<_Tp>::Mat_(Mat&& m) : Mat() { flags = (flags & ~CV_MAT_TYPE_MASK) | traits::Type<_Tp>::value; - *this = m; + *this = std::move(m); } template inline