diff --git a/LArCalorimeter/LArG4/LArG4Barrel/src/PhysicalVolumeAccessor.cxx b/LArCalorimeter/LArG4/LArG4Barrel/src/PhysicalVolumeAccessor.cxx index 397f3d9a6d3fcfb8feabf1efc47a13aa24630b15..41a9f28d524433e890678d1090f16a047ed736f0 100644 --- a/LArCalorimeter/LArG4/LArG4Barrel/src/PhysicalVolumeAccessor.cxx +++ b/LArCalorimeter/LArG4/LArG4Barrel/src/PhysicalVolumeAccessor.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "PhysicalVolumeAccessor.h" @@ -34,7 +34,7 @@ PhysicalVolumeAccessor::PhysicalVolumeAccessor(std::string name, for (int i=0;i<m_theLogicalVolume->GetNoDaughters();i++) { G4VPhysicalVolume *pv=m_theLogicalVolume->GetDaughter(i); - if (PVname==(pv->GetName())) + if (PVname == static_cast<const std::string&>(pv->GetName())) { m_thePhysicalVolumes[pv->GetCopyNo()]=pv; } @@ -60,7 +60,7 @@ void PhysicalVolumeAccessor::SetPhysicalVolumeList(std::string name) for (int i=0;i<m_theLogicalVolume->GetNoDaughters();i++) { G4VPhysicalVolume *pv=m_theLogicalVolume->GetDaughter(i); - if (name==(pv->GetName())) + if (name == static_cast<const std::string&>(pv->GetName())) { m_thePhysicalVolumes[pv->GetCopyNo()]=pv; } diff --git a/Simulation/G4Atlas/G4AtlasTools/src/AddPhysicsDecayTool.cxx b/Simulation/G4Atlas/G4AtlasTools/src/AddPhysicsDecayTool.cxx index 0eb33e92413f73f0eb6e416445b8087c07c52460..a9836a15b796627ba0c3a64dc9f19e788682e5f3 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/AddPhysicsDecayTool.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/AddPhysicsDecayTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // Include files @@ -76,7 +76,7 @@ void AddPhysicsDecayTool::ConstructProcess() while( (*PARTICLEITERATOR)() ) { G4ParticleDefinition *particle = PARTICLEITERATOR->value(); - if (m_ParticleName== particle->GetParticleName()) + if (m_ParticleName== static_cast<const std::string&>(particle->GetParticleName())) { G4DecayTable *table = particle->GetDecayTable(); diff --git a/Simulation/G4Atlas/G4AtlasTools/src/RegionCreator.cxx b/Simulation/G4Atlas/G4AtlasTools/src/RegionCreator.cxx index 960345faa16e500fab12e8c666a6dabf75496997..e7d7bb9ae1e264cada87dcb3a1418c5f44accbaf 100644 --- a/Simulation/G4Atlas/G4AtlasTools/src/RegionCreator.cxx +++ b/Simulation/G4Atlas/G4AtlasTools/src/RegionCreator.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // Base class @@ -49,7 +49,7 @@ StatusCode RegionCreator::initialize() for (auto* it: *logStore) { - if (vol==it->GetName()) + if (vol == static_cast<const std::string&>(it->GetName())) { nVolumes++; it->SetRegion(theRegion);