1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

core: avoid function type cast, make happy UBSAN

backporting of commit: d3d13c41c4
This commit is contained in:
Alexander Alekhin
2019-06-11 07:06:29 +00:00
parent b3e6c97d98
commit f8791f072d
3 changed files with 45 additions and 37 deletions
+2 -2
View File
@@ -228,12 +228,12 @@ void convertFp16(InputArray _src, OutputArray _dst)
}
else
ddepth = CV_16S;
func = (BinaryFunc)get_cvt32f16f();
func = get_cvt32f16f();
break;
case CV_16S:
//case CV_16F:
ddepth = CV_32F;
func = (BinaryFunc)get_cvt16f32f();
func = get_cvt16f32f();
break;
default:
CV_Error(Error::StsUnsupportedFormat, "Unsupported input depth");