From 4e2c7221f2d7db9a781afbb41bcf49e599720f09 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Mon, 22 Jan 2024 12:08:55 +0300 Subject: [PATCH] Fixed type cast warning in CV_ELEM_SIZE1 for cv::Mat::type. --- modules/core/include/opencv2/core/cvdef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h index 11457451ef..7f0790834c 100644 --- a/modules/core/include/opencv2/core/cvdef.h +++ b/modules/core/include/opencv2/core/cvdef.h @@ -499,7 +499,7 @@ Cv64suf; CV_16U - 2 bytes ... */ -#define CV_ELEM_SIZE1(type) ((int)(0x4881228442211ULL >> (CV_MAT_DEPTH(type) * 4)) & 15) +#define CV_ELEM_SIZE1(type) ((int)((0x4881228442211ULL >> (CV_MAT_DEPTH(type) * 4)) & 15)) #define CV_ELEM_SIZE(type) (CV_MAT_CN(type)*CV_ELEM_SIZE1(type))