From 4555f9ac256373377071ebcd3174a7253d8bca04 Mon Sep 17 00:00:00 2001 From: berak Date: Mon, 14 Mar 2016 08:02:09 +0100 Subject: [PATCH] svmsgd.cpp, fix #6248 add a cast to double, to make vs compilers happy --- modules/ml/src/svmsgd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ml/src/svmsgd.cpp b/modules/ml/src/svmsgd.cpp index ed452e35e..ef5da6f71 100644 --- a/modules/ml/src/svmsgd.cpp +++ b/modules/ml/src/svmsgd.cpp @@ -153,7 +153,7 @@ void SVMSGDImpl::normalizeSamples(Mat &samples, Mat &average, float &multiplier) double normValue = norm(samples); - multiplier = static_cast(sqrt(samples.total()) / normValue); + multiplier = static_cast(sqrt(static_cast(samples.total())) / normValue); samples *= multiplier; }