From 61d347fdd2e89ed72f2ce9b8db5575644f27bccf Mon Sep 17 00:00:00 2001 From: Tomasz Bialek Date: Mon, 29 Jul 2024 19:25:30 -0500 Subject: [PATCH] Fixed casting issue --- modules/core/include/opencv2/core/mat.inl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/include/opencv2/core/mat.inl.hpp b/modules/core/include/opencv2/core/mat.inl.hpp index ba69deadb6..eba5910da0 100644 --- a/modules/core/include/opencv2/core/mat.inl.hpp +++ b/modules/core/include/opencv2/core/mat.inl.hpp @@ -1672,7 +1672,7 @@ template inline const _Tp* Mat_<_Tp>::operator [](int y) const { CV_DbgAssert( 0 <= y && y < size.p[0] ); - _Tp* p = (const _Tp*)((void*)(data + y*step.p[0])); + const _Tp* p = (const _Tp*)((const void*)(data + y*step.p[0])); CV_DbgAssert(((uintptr_t)p & (alignof(_Tp) - 1)) == 0); return p; }