From 74e4cfd1da06fe25240b725ed6c8948a13b5a722 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 1 May 2020 07:29:10 +0000 Subject: [PATCH] core(MatExpr): fix warning in case of e.s == (0, 0, 0, 0) --- modules/core/src/matrix_expressions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/matrix_expressions.cpp b/modules/core/src/matrix_expressions.cpp index 58c99ed19a..44ac8f1713 100644 --- a/modules/core/src/matrix_expressions.cpp +++ b/modules/core/src/matrix_expressions.cpp @@ -1329,7 +1329,7 @@ void MatOp_AddEx::assign(const MatExpr& e, Mat& m, int _type) const } else if( e.s.isReal() && (dst.data != m.data || fabs(e.alpha) != 1)) { - if (e.a.channels() > 1) + if (e.a.channels() > 1 && e.s[0] != 0.0) CV_LOG_ONCE_WARNING(NULL, "OpenCV/MatExpr: processing of multi-channel arrays might be changed in the future: " "https://github.com/opencv/opencv/issues/16739"); e.a.convertTo(m, _type, e.alpha, e.s[0]);