mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Deprecated convertTypeStr and made new variant that also takes the buffer size
This allows removing the unsafe sprintf.
This commit is contained in:
@@ -1263,8 +1263,8 @@ void UMat::convertTo(OutputArray _dst, int _type, double alpha, double beta) con
|
||||
ocl::Kernel k("convertTo", ocl::core::convert_oclsrc,
|
||||
format("-D srcT=%s -D WT=%s -D dstT=%s -D convertToWT=%s -D convertToDT=%s%s%s",
|
||||
ocl::typeToStr(sdepth), ocl::typeToStr(wdepth), ocl::typeToStr(ddepth),
|
||||
ocl::convertTypeStr(sdepth, wdepth, 1, cvt[0]),
|
||||
ocl::convertTypeStr(wdepth, ddepth, 1, cvt[1]),
|
||||
ocl::convertTypeStr(sdepth, wdepth, 1, cvt[0], sizeof(cvt[0])),
|
||||
ocl::convertTypeStr(wdepth, ddepth, 1, cvt[1], sizeof(cvt[1])),
|
||||
doubleSupport ? " -D DOUBLE_SUPPORT" : "", noScale ? " -D NO_SCALE" : ""));
|
||||
if (!k.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user