Skip to content
Snippets Groups Projects
Commit 7bab0df3 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'cppcheck.TrigConfIO-20240306' into 'main'

TrigConfIO+L1TopoInterfaces: Fix cppcheck warnings.

See merge request atlas/athena!69584
parents 1ccf3d04 f9fd29fb
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include <cstdlib>
......@@ -225,7 +225,7 @@ testL1Menu_Thresholds(const TrigConf::L1Menu & l1menu, bool printdetail)
if(printdetail) {
cout << " thresholds, going to print the first three." << endl;
int ni = 3; // print the first 3
for(auto thr : l1menu.thresholds(tt) ) {
for(const auto& thr : l1menu.thresholds(tt) ) {
cout << " " << thr->name() << " of type " << thr->type() << " (mapping " << thr->mapping() << ") " << endl;
if(--ni==0) break;
}
......@@ -233,7 +233,7 @@ testL1Menu_Thresholds(const TrigConf::L1Menu & l1menu, bool printdetail)
cout << endl;
}
if(tt != "internal") {
for(auto thr : l1menu.thresholds(tt) ) {
for(const auto& thr : l1menu.thresholds(tt) ) {
if(thr->name().find("MULT-CMU") != std::string::npos){ continue; } // tmp hack!
const std::string & connName = l1menu.connectorNameFromThreshold(thr->name());
if(! l1menu.connector(connName).hasLine(thr->name())) {
......
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
// ParameterSpace.cxx
// TopoCore
......@@ -130,7 +130,7 @@ std::ostream &
operator<<(std::ostream &o, const TCS::ParameterSpace & ps) {
if( ps.isInitialized()) {
o << " parameters: " << ps().size();
for(TCS::Parameter parameter : ps) {
for(const TCS::Parameter& parameter : ps) {
o << endl << " " << parameter;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment