From 5caf3089287950cd9fe074f8d4b2d51ffd469339 Mon Sep 17 00:00:00 2001 From: Markus Frank <markus.frank@cern.ch> Date: Fri, 13 Dec 2013 16:22:39 +0000 Subject: [PATCH] Fix slc5 compile problems --- DDG4/include/DDG4/Geant4Handle.h | 4 ++-- DDG4/src/Geant4Handle.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DDG4/include/DDG4/Geant4Handle.h b/DDG4/include/DDG4/Geant4Handle.h index 996c3b031..6560224cc 100644 --- a/DDG4/include/DDG4/Geant4Handle.h +++ b/DDG4/include/DDG4/Geant4Handle.h @@ -50,13 +50,13 @@ namespace DD4hep { : value(0) { checked_assign(dynamic_cast<handled_type*>(typ)); } - Geant4Handle(Geant4Handle& handle); + Geant4Handle(const Geant4Handle& handle); Geant4Handle(const Geant4Kernel&, const std::string& type_name); /// Constructor only implemented for sensitive objects Geant4Handle(const Geant4Kernel& ctxt, const std::string& type_name, const std::string& detector); ~Geant4Handle(); Property& operator[](const std::string& property_name) const; - Geant4Handle& operator=(Geant4Handle& handle); + Geant4Handle& operator=(const Geant4Handle& handle); Geant4Handle& operator=(handled_type* ptr); bool operator!() const; operator handled_type*() const; diff --git a/DDG4/src/Geant4Handle.cpp b/DDG4/src/Geant4Handle.cpp index aa7963cac..8b0c31939 100644 --- a/DDG4/src/Geant4Handle.cpp +++ b/DDG4/src/Geant4Handle.cpp @@ -49,7 +49,7 @@ template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle(TYPE* typ) value->addRef(); } -template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle(Geant4Handle<TYPE>& handle) +template <typename TYPE> Geant4Handle<TYPE>::Geant4Handle(const Geant4Handle<TYPE>& handle) : value(0) { value = handle.get(); if (value) @@ -132,7 +132,7 @@ template <typename TYPE> Geant4Action* Geant4Handle<TYPE>::action() const { return checked_value(value); } -template <typename TYPE> Geant4Handle<TYPE>& Geant4Handle<TYPE>::operator=(Geant4Handle& handle) { +template <typename TYPE> Geant4Handle<TYPE>& Geant4Handle<TYPE>::operator=(const Geant4Handle& handle) { if (value) value->release(); value = handle.get(); -- GitLab