From de0c96627ee696b2dd3a554a69cf8c39f5576255 Mon Sep 17 00:00:00 2001 From: Yongyan Liu Date: Thu, 27 Aug 2026 20:38:05 -0400 Subject: [PATCH] [tmva][sofie] Improve const correctness in shape iteration --- tmva/sofie/src/SOFIE_common.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }