Skip to content

Commit

Permalink
fix llvm warnings for sim: avoid loop variable copy
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Apr 28, 2020
1 parent f8a15d1 commit 58fc07f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void PreMixingCaloParticleWorker::add(const SimClusterCollection &clusters,
}

// Add energies
for (const auto elem : energy) {
for (const auto &elem : energy) {
totalEnergy_[elem.first] += elem.second;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void DD4hep_ListGroups::analyze(const edm::Event &evt, const edm::EventSetup &se
std::cout << "***" << i << std::endl;

for (const auto j : fv1.specpars()) {
for (const auto k : j->paths) {
for (const auto &k : j->paths) {
std::cout << k << std::endl;
if (firstChild) {
std::cout << "Find children matching selection for a parent " << fv1.name() << "\n";
Expand Down

0 comments on commit 58fc07f

Please sign in to comment.