From bddb4b22ae77f33ae53ec63d0186e7e107717f8a Mon Sep 17 00:00:00 2001 From: pifopi Date: Sun, 18 May 2025 14:35:03 +0200 Subject: [PATCH] custom fix for open CV warning --- 3rdParty/opencv2/core/types.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/3rdParty/opencv2/core/types.hpp b/3rdParty/opencv2/core/types.hpp index fc9ed18820..f69e499f36 100644 --- a/3rdParty/opencv2/core/types.hpp +++ b/3rdParty/opencv2/core/types.hpp @@ -1851,8 +1851,10 @@ template inline _Tp Rect_<_Tp>::area() const { const _Tp result = width * height; - CV_DbgAssert(!std::numeric_limits<_Tp>::is_integer - || width == 0 || result / width == height); // make sure the result fits in the return value + if constexpr (std::numeric_limits<_Tp>::is_integer) + { + CV_DbgAssert(width == 0 || result / width == height); // make sure the result fits in the return value + } return result; }