From 28aba9617e5abc760bd8045363daead157098b9e Mon Sep 17 00:00:00 2001
From: scott snyder <scott.snyder@cern.ch>
Date: Tue, 13 Mar 2018 16:02:31 +0100
Subject: [PATCH] AthenaKernel: Coverity 118547.

Fix coverity warning: shadowed parameter.
---
 Control/AthenaKernel/AthenaKernel/MetaCont.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Control/AthenaKernel/AthenaKernel/MetaCont.h b/Control/AthenaKernel/AthenaKernel/MetaCont.h
index 446edfa56008..ff76e28a5ffa 100644
--- a/Control/AthenaKernel/AthenaKernel/MetaCont.h
+++ b/Control/AthenaKernel/AthenaKernel/MetaCont.h
@@ -193,9 +193,8 @@ bool MetaCont<T>::find(const SourceID& it, T*& t) const {
     return true;
   }
   else {
-    typename MetaContSet::const_iterator it=m_metaSet.begin();
-    for (; it != m_metaSet.end(); ++it) {
-      std::cerr << "Container has SID=" << it->first << std::endl;
+    for (const auto& elt : m_metaSet) {
+      std::cerr << "Container has SID=" << elt.first << std::endl;
     }
   }
 
-- 
GitLab