From dd5576a0c93aee8d5492e4d89586da52b0bb8378 Mon Sep 17 00:00:00 2001 From: Zhang Yao <zhangyao@ihep.ac.cn> Date: Wed, 20 Jan 2021 19:55:59 +0800 Subject: [PATCH] Fix compiler warning in IGeomSvc and GeomSvc --- Detector/DetInterface/include/DetInterface/IGeomSvc.h | 2 +- Detector/GeomSvc/src/GeomSvc.cpp | 2 +- Detector/GeomSvc/src/GeomSvc.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Detector/DetInterface/include/DetInterface/IGeomSvc.h b/Detector/DetInterface/include/DetInterface/IGeomSvc.h index 7fe1255d..d4f508b9 100644 --- a/Detector/DetInterface/include/DetInterface/IGeomSvc.h +++ b/Detector/DetInterface/include/DetInterface/IGeomSvc.h @@ -56,7 +56,7 @@ public: virtual const dd4hep::rec::ConicalSupportData* getBeamPipeData() =0; virtual const std::map<std::string,double>& getDetParameters(std::string s) = 0; - virtual const double getDetParameter(std::string set_name, std::string par_name) = 0; + virtual double getDetParameter(std::string set_name, std::string par_name) = 0; virtual TMaterial* getMaterial(std::string s) = 0; virtual ~IGeomSvc() {} diff --git a/Detector/GeomSvc/src/GeomSvc.cpp b/Detector/GeomSvc/src/GeomSvc.cpp index 050431b8..878d60c8 100644 --- a/Detector/GeomSvc/src/GeomSvc.cpp +++ b/Detector/GeomSvc/src/GeomSvc.cpp @@ -130,7 +130,7 @@ const std::map<std::string,double>& GeomSvc::getDetParameters(std::string name){ } } -const double GeomSvc::getDetParameter(std::string set_name, std::string par_name){ +double GeomSvc::getDetParameter(std::string set_name, std::string par_name){ std::map<std::string, std::map<std::string,double> >::iterator it=m_detParameters.find(set_name); if(it!=m_detParameters.end()){ if(it->second.find(par_name)!=it->second.end()) return it->second[par_name]; diff --git a/Detector/GeomSvc/src/GeomSvc.h b/Detector/GeomSvc/src/GeomSvc.h index 20d559a7..379d5b08 100644 --- a/Detector/GeomSvc/src/GeomSvc.h +++ b/Detector/GeomSvc/src/GeomSvc.h @@ -40,7 +40,7 @@ class GeomSvc: public extends<Service, IGeomSvc> { const dd4hep::rec::ConicalSupportData* getBeamPipeData() override {return m_beamPipeData;}; const std::map<std::string,double>& getDetParameters(std::string name) override; - const double getDetParameter(std::string set_name, std::string par_name) override; + double getDetParameter(std::string set_name, std::string par_name) override; TMaterial* getMaterial(std::string name); private: -- GitLab