diff --git a/tmva/sofie/src/SOFIE_common.cxx b/tmva/sofie/src/SOFIE_common.cxx index 672d77048ef38..8b07216f63929 100644 --- a/tmva/sofie/src/SOFIE_common.cxx +++ b/tmva/sofie/src/SOFIE_common.cxx @@ -54,7 +54,8 @@ std::vector ConvertShapeToInt(const std::vector & shape){ std::size_t ConvertShapeToLength(const std::vector & shape){ // Empty shape represent scalar values, so we return a length=1 std::size_t fLength = 1; - for (auto& dim: shape) fLength *= dim; + for (const auto &dim : shape) + fLength *= dim; return fLength; }