Skip to content
Snippets Groups Projects
Commit 3622a794 authored by sss's avatar sss Committed by Andre Sailer
Browse files

Fix potential use of dangling temporary.

In

```
  const TGeoHMatrix& m = par.nominal().worldTransformation();
```
nominal() returns a temporary Alignment object by value, and
worldTransformation() returns a reference within that Alignment object.
So we shoud make a copy.
parent 80ba3f2b
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ void Installer<UserData>::install(dd4hep::DetElement component, dd4hep::PlacedVo
}
else if ( !handleUsingCache(component,comp_vol) ) {
dd4hep::DetElement par = component.parent();
const TGeoHMatrix& m = par.nominal().worldTransformation();
const TGeoHMatrix m = par.nominal().worldTransformation();
double dz = m.GetTranslation()[2];
const double* trans = placementTranslation(component);
double half_mod_thickness = (mod_shape->GetZ(1)-mod_shape->GetZ(0))/2.0;
......
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