Skip to content
Snippets Groups Projects
Commit 37c4ef75 authored by Takashi Yamanaka's avatar Takashi Yamanaka
Browse files

Merge branch 'ubsan.MuonReadoutGeometry-20170424' into 'master'

MuonReadoutGeometry: Fix more undefined behavior sanitizer warnings.

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