From cf7d38f85097c149f741bb5d4c95e933833ac3bd Mon Sep 17 00:00:00 2001
From: Simon Heybrock <simon.heybrock@esss.se>
Date: Tue, 19 Dec 2017 13:23:13 +0100
Subject: [PATCH] Re #21181. Minor cleanup in IndexInfo.

---
 Framework/Indexing/src/IndexInfo.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Framework/Indexing/src/IndexInfo.cpp b/Framework/Indexing/src/IndexInfo.cpp
index b3f7dfbab5a..a9ac6b11c00 100644
--- a/Framework/Indexing/src/IndexInfo.cpp
+++ b/Framework/Indexing/src/IndexInfo.cpp
@@ -264,10 +264,10 @@ IndexInfo::globalSpectrumIndicesFromDetectorIndices(
   std::vector<size_t> allSizes;
   Parallel::gather(communicator(), size(), allSizes, 0);
   std::vector<GlobalSpectrumIndex> spectrumIndices;
+  int tag = 0;
   if (communicator().rank() == 0) {
     for (int rank = 1; rank < communicator().size(); ++rank) {
       spectrumDefinitions[rank].resize(allSizes[rank]);
-      int tag = 0;
       auto buffer = reinterpret_cast<char *>(spectrumDefinitions[rank].data());
       auto bytes = static_cast<int>(sizeof(int64_t) * allSizes[rank]);
       communicator().recv(rank, tag, buffer, bytes);
@@ -297,13 +297,11 @@ IndexInfo::globalSpectrumIndicesFromDetectorIndices(
             "possible");
     }
     for (int rank = 1; rank < communicator().size(); ++rank) {
-      int tag = 0;
       auto buffer = reinterpret_cast<char *>(spectrumIndices.data());
       auto bytes = static_cast<int>(sizeof(int64_t) * spectrumIndices.size());
       communicator().send(rank, tag, buffer, bytes);
     }
   } else {
-    int tag = 0;
     auto buffer = reinterpret_cast<char *>(thisRankSpectrumDefinitions.data());
     auto bytes = static_cast<int>(sizeof(int64_t) * size());
     communicator().send(0, tag, buffer, bytes);
-- 
GitLab