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

Merge branch 'cppcheck.TrigConfL1Data-20240304' into 'main'

TrigConfL1Data: Fix cppcheck warnings.

See merge request atlas/athena!69477
parents 4be4cedc 63b98bad
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include "TrigConfL1Data/BunchGroupSet.h"
......@@ -18,7 +18,7 @@ BunchGroupSet::BunchGroupSet(const std::vector<BunchGroup>& bgv) :
m_BunchGroups(bgv),
m_BGpattern(3564)
{
for(BunchGroup bg: m_BunchGroups)
for(const BunchGroup& bg: m_BunchGroups)
fillPattern(bg.internalNumber(), bg);
}
......@@ -55,7 +55,7 @@ BunchGroupSet::print(const std::string& indent, unsigned int detail) const {
cout << endl;
cout << indent << "Number of bunch groups: " << m_BunchGroups.size() << endl;
if(detail>=2) {
for(BunchGroup bg: m_BunchGroups)
for(const BunchGroup& bg: m_BunchGroups)
bg.print(indent + indent, detail);
}
}
......@@ -65,7 +65,7 @@ void
BunchGroupSet::writeXML(std::ostream & xmlfile, int indentLevel, int indentWidth) const {
indent(xmlfile,indentLevel, indentWidth)
<< "<BunchGroupSet name=\"" << name() << "\" menuPartition=\"" << m_MenuPartition << "\">" << endl;
for(BunchGroup bg: m_BunchGroups)
for(const BunchGroup& bg: m_BunchGroups)
bg.writeXML(xmlfile, indentLevel+1, indentWidth);
indent(xmlfile,indentLevel, indentWidth)
<< "</BunchGroupSet>" << endl;
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include "TrigConfL1Data/DiffStruct.h"
......@@ -78,7 +78,7 @@ TrigConf::DiffStruct::writeXML(ofstream & xmlfile, const std::string& prefix) co
xmlfile << prefix << "<" << tagname;
if(name!="")
xmlfile << " name=\"" << name << "\"";
for(AttDiff d : attdiffs)
for(const AttDiff& d : attdiffs)
xmlfile << " " << d.attname << "_l=\"" << d.lval << "\" " << d.attname << "_r=\"" << d.rval << "\"";
if(subs.size()==0 && rightonly.size()==0 && leftonly.size()==0) {
xmlfile << "/>" << endl;
......
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