From 58d4b7a31c825761c321d835b3702ed2d02e3d85 Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Fri, 22 Dec 2023 15:13:59 +0100 Subject: [PATCH] Don't hide local variable --- src/nrniv/have2want.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nrniv/have2want.hpp b/src/nrniv/have2want.hpp index 775e94d365..a0602104c6 100644 --- a/src/nrniv/have2want.hpp +++ b/src/nrniv/have2want.hpp @@ -77,9 +77,9 @@ static std::tuple, Data> rendezvous_rank_get(const std::vector& da // scatter data into sdata by recalculating s.cnt. std::fill(s.cnt.begin(), s.cnt.end(), 0); for (const auto& e: data) { - int r = rendezvous_rank(e); - s.data[s.displ[r] + s.cnt[r]] = e; - s.cnt[r] += 1; + int rank = rendezvous_rank(e); + s.data[s.displ[rank] + s.cnt[r]] = e; + s.cnt[rank] += 1; } alltoall_function(s, r); return {s, r};