From 25a145172426712a3f5bd41c70111e87c65db6f1 Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Tue, 5 Nov 2024 07:13:13 +0100 Subject: [PATCH] TrackingAnalysisAlgorithms: Fix clang warnings. TrackingAnalysisAlgorithms: Fix clang warnings. Binding references to temporaries in range-for. --- .../Root/SecVertexTruthMatchAlg.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PhysicsAnalysis/Algorithms/TrackingAnalysisAlgorithms/Root/SecVertexTruthMatchAlg.cxx b/PhysicsAnalysis/Algorithms/TrackingAnalysisAlgorithms/Root/SecVertexTruthMatchAlg.cxx index 061197b39f1..b8c6da518b2 100644 --- a/PhysicsAnalysis/Algorithms/TrackingAnalysisAlgorithms/Root/SecVertexTruthMatchAlg.cxx +++ b/PhysicsAnalysis/Algorithms/TrackingAnalysisAlgorithms/Root/SecVertexTruthMatchAlg.cxx @@ -128,7 +128,7 @@ namespace CP { std::vector<const xAOD::Vertex*> recoVerticesToMatch; std::vector<const xAOD::TruthVertex*> truthVerticesToMatch; - for(const auto &recoVertex : *recoVertexContainer) { + for(const auto recoVertex : *recoVertexContainer) { xAOD::VxType::VertexType vtxType = static_cast<xAOD::VxType::VertexType>( recoVertex->vertexType() ); if(vtxType != xAOD::VxType::SecVtx ){ @@ -138,7 +138,7 @@ namespace CP { recoVerticesToMatch.push_back(recoVertex); } - for(const auto &truthVertex : *truthVertexContainer) { + for(const auto truthVertex : *truthVertexContainer) { if(truthVertex->nIncomingParticles() != 1) { continue; } -- GitLab