Skip to content

Commit 12ee857

Browse files
committed
custom fix for open CV warning
1 parent d66db26 commit 12ee857

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

3rdParty/opencv2/core/types.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,8 +1851,10 @@ template<typename _Tp> inline
18511851
_Tp Rect_<_Tp>::area() const
18521852
{
18531853
const _Tp result = width * height;
1854-
CV_DbgAssert(!std::numeric_limits<_Tp>::is_integer
1855-
|| width == 0 || result / width == height); // make sure the result fits in the return value
1854+
if constexpr (std::numeric_limits<_Tp>::is_integer)
1855+
{
1856+
CV_DbgAssert(width == 0 || result / width == height); // make sure the result fits in the return value
1857+
}
18561858
return result;
18571859
}
18581860

0 commit comments

Comments
 (0)