Skip to content
Snippets Groups Projects

BoundarySurface: Copying vector of shared_ptr is expensive, use reference instead

Merged Adam Edward Barton requested to merge abarton/athena:extrapCopy into master
10 files
+ 34
34
Compare changes
  • Side-by-side
  • Inline
Files
10
@@ -103,8 +103,8 @@ void Trk::TrackingVolumeHelper::glueTrackingVolumes(const Trk::TrackingVolume& f
@@ -103,8 +103,8 @@ void Trk::TrackingVolumeHelper::glueTrackingVolumes(const Trk::TrackingVolume& f
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// create a MaterialLayer as a boundary
// create a MaterialLayer as a boundary
if (buildBoundaryLayer){
if (buildBoundaryLayer){
auto bSurfacesFirst = firstVol.boundarySurfaces();
const auto& bSurfacesFirst = firstVol.boundarySurfaces();
auto bSurfacesSecond = secondVol.boundarySurfaces();
const auto& bSurfacesSecond = secondVol.boundarySurfaces();
// get the boundary surfaces
// get the boundary surfaces
const Trk::Surface& firstFaceSurface = bSurfacesFirst[firstFace]->surfaceRepresentation();
const Trk::Surface& firstFaceSurface = bSurfacesFirst[firstFace]->surfaceRepresentation();
const Trk::Surface& secondFaceSurface = bSurfacesSecond[secondFace]->surfaceRepresentation();
const Trk::Surface& secondFaceSurface = bSurfacesSecond[secondFace]->surfaceRepresentation();
Loading