From 0975dc45d47ec1434bc25dee547d68d812e38a2f Mon Sep 17 00:00:00 2001 From: Anton Alkin Date: Tue, 1 Dec 2026 14:32:09 +0100 Subject: [PATCH] Avoid redundant copying in a loop --- PWGCF/Tasks/correlations.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/Tasks/correlations.cxx b/PWGCF/Tasks/correlations.cxx index 002166346bf..b1ea73f2935 100644 --- a/PWGCF/Tasks/correlations.cxx +++ b/PWGCF/Tasks/correlations.cxx @@ -1159,7 +1159,7 @@ struct CorrelationTask { using TB = std::tuple_element - 1, decltype(tracksTuple)>::type; Pair pairs{configurableBinningDerived, cfgNoMixedEvents, -1, collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip - for (auto it = pairs.begin(); it != pairs.end(); it++) { + for (auto it = pairs.begin(), end = pairs.end(); it != end; ++it) { auto& [collision1, tracks1, collision2, tracks2] = *it; float multiplicity = getMultiplicity(collision1); int bin = configurableBinningDerived.getBin(std::tuple(collision1.posZ(), multiplicity));