From 8c29ce40ec62650a63a89f5dd13292c9570b34ac Mon Sep 17 00:00:00 2001 From: Antoine Regimbeau <antoine.regimbeau@c-s.fr> Date: Fri, 22 Sep 2017 18:01:43 +0200 Subject: [PATCH] BUG: bug fix for accumulate function --- .../Applications/AppFiltering/app/otbContrastEnhancement.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx b/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx index dbcc3f38d6..46cbd9082d 100644 --- a/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx +++ b/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx @@ -550,7 +550,7 @@ private: lumCoef[1] = GetParameterFloat("mode.lum.gre.coef"); lumCoef[2] = GetParameterFloat("mode.lum.blu.coef"); // Normalize those coeffs - float sum = std::accumulate( lumCoef.begin() , lumCoef.end() , 0 ); + float sum = std::accumulate( lumCoef.begin() , lumCoef.end() , 0.0 ); assert(sum>0); for (int i = 0 ; i<3 ; i++ ) { -- GitLab