Skip to content

Commit

Permalink
Merge pull request #29002 from davidlange6/dl200219v2
Browse files Browse the repository at this point in the history
remove tuple copies
  • Loading branch information
cmsbuild committed Feb 20, 2020
2 parents 0f1cc8c + 16d4c32 commit 3b14bf2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc
Expand Up @@ -94,7 +94,7 @@ TrackerGeometry::TrackerGeometry(GeometricDet const* gd) : theTrackerDet(gd) {
LogDebug("ThicknessAndType") << det->geographicalId() << " " << det->name() << " " << det->bounds()->thickness();
}
LogDebug("DetTypeList") << " Content of DetTypetList : size " << theDetTypetList.size();
for (auto iVal : theDetTypetList) {
for (const auto& iVal : theDetTypetList) {
LogDebug("DetTypeList") << " DetId " << std::get<0>(iVal) << " Type "
<< static_cast<std::underlying_type<TrackerGeometry::ModuleType>::type>(std::get<1>(iVal))
<< " Thickness " << std::get<2>(iVal);
Expand Down Expand Up @@ -245,7 +245,7 @@ void TrackerGeometry::fillTestMap(const GeometricDet* gd) {
}

TrackerGeometry::ModuleType TrackerGeometry::getDetectorType(DetId detid) const {
for (auto iVal : theDetTypetList) {
for (const auto& iVal : theDetTypetList) {
DetId detid_max = std::get<0>(iVal);
if (detid.rawId() <= detid_max.rawId())
return std::get<1>(iVal);
Expand All @@ -254,7 +254,7 @@ TrackerGeometry::ModuleType TrackerGeometry::getDetectorType(DetId detid) const
}

float TrackerGeometry::getDetectorThickness(DetId detid) const {
for (auto iVal : theDetTypetList) {
for (const auto& iVal : theDetTypetList) {
DetId detid_max = std::get<0>(iVal);
if (detid.rawId() <= detid_max.rawId())
return std::get<2>(iVal);
Expand Down

0 comments on commit 3b14bf2

Please sign in to comment.