From ef0931be4445490ee8fa85b17381da2f0a45dd97 Mon Sep 17 00:00:00 2001 From: atinfinity Date: Wed, 18 May 2016 00:34:51 +0900 Subject: [PATCH] fixed compilation warning --- modules/imgproc/test/test_thresh.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/imgproc/test/test_thresh.cpp b/modules/imgproc/test/test_thresh.cpp index 529bff70da..b7db66e989 100644 --- a/modules/imgproc/test/test_thresh.cpp +++ b/modules/imgproc/test/test_thresh.cpp @@ -170,7 +170,7 @@ static void test_threshold( const Mat& _src, Mat& _dst, const float* src = _src.ptr(i); float* dst = _dst.ptr(i); for( j = 0; j < width_n; j++ ) - dst[j] = src[j] > thresh ? maxval : 0.f; + dst[j] = (float)(src[j] > thresh ? maxval : 0.f); } else { @@ -203,7 +203,7 @@ static void test_threshold( const Mat& _src, Mat& _dst, const float* src = _src.ptr(i); float* dst = _dst.ptr(i); for( j = 0; j < width_n; j++ ) - dst[j] = src[j] > thresh ? 0.f : maxval; + dst[j] = (float)(src[j] > thresh ? 0.f : maxval); } else { @@ -244,7 +244,7 @@ static void test_threshold( const Mat& _src, Mat& _dst, for( j = 0; j < width_n; j++ ) { float s = src[j]; - dst[j] = s > thresh ? thresh : s; + dst[j] = (float)(s > thresh ? thresh : s); } } else