Skip to content
Snippets Groups Projects
Commit b07b1e28 authored by scott snyder's avatar scott snyder
Browse files

MuonReadoutGeometry: Fix more undefined behavior sanitizer warnings.


Former-commit-id: 9d7f8df3
parent e1bc8da0
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@
#include "GeoModelKernel/GeoPhysVol.h"
#include "GeoModelKernel/GeoTrd.h"
#include "GeoModelKernel/GeoShapeSubtraction.h"
#include "GeoModelKernel/GeoFullPhysVol.h"
#include "GaudiKernel/MsgStream.h"
#include "TrkSurfaces/PlaneSurface.h"
#include "TrkSurfaces/RectangleBounds.h"
......@@ -64,9 +65,7 @@ namespace MuonGM {
bool foundShape = false;
if (mgr->MinimalGeoFlag() == 0) {
GeoPhysVol* pvc = NULL;
pvc = (GeoPhysVol*)pv;
if (pvc != NULL) {
if (GeoFullPhysVol* pvc = dynamic_cast<GeoFullPhysVol*> (pv)) {
unsigned int nchildvol = pvc->getNChildVols();
int llay = 0;
std::string::size_type npos;
......
......@@ -19,6 +19,7 @@
#include "GeoModelKernel/GeoSimplePolygonBrep.h"
#include "GeoModelKernel/GeoShapeSubtraction.h"
#include "GeoModelKernel/GeoShapeShift.h"
#include "GeoModelKernel/GeoFullPhysVol.h"
#include "GaudiKernel/MsgStream.h"
#include "TrkSurfaces/PlaneSurface.h"
#include "TrkSurfaces/RectangleBounds.h"
......@@ -93,9 +94,7 @@ namespace MuonGM {
if (mgr->MinimalGeoFlag() == 0) {
GeoPhysVol* pvc = NULL;
pvc = (GeoPhysVol*)pv;
if (pvc != NULL) {
if (GeoFullPhysVol* pvc = dynamic_cast<GeoFullPhysVol*> (pv)) {
unsigned int nchildvol = pvc->getNChildVols();
int llay = 0;
std::string::size_type npos;
......
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