diff --git a/Calorimeter/CaloRec/CaloRec/ToolWithConstantsMixin.h b/Calorimeter/CaloRec/CaloRec/ToolWithConstantsMixin.h index 96cac9061162c5771d289c33e5321350d464c34a..60c51cb6e6422f8efc180800299c42a01802544f 100644 --- a/Calorimeter/CaloRec/CaloRec/ToolWithConstantsMixin.h +++ b/Calorimeter/CaloRec/CaloRec/ToolWithConstantsMixin.h @@ -1,10 +1,9 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -// $Id: ToolWithConstantsMixin.h,v 1.10 2009-04-18 02:56:16 ssnyder Exp $ /** * @file ToolWithConstantsMixin.h * @author scott snyder <snyder@bnl.gov> @@ -196,9 +195,9 @@ public: * be an instance of one of the @c Array<N> classes. */ template <class T> - StatusCode declareConstant (const std::string& name, - T& c, - bool deflt = false); + void declareConstant (const std::string& name, + T& c, + bool deflt = false); /** @@ -461,7 +460,7 @@ private: * @brief Add a new constant to our store. * @param pi The @c Propinfo instance describing this constant. */ - StatusCode add_constant (Propinfo_Base* pi); + void add_constant (Propinfo_Base* pi); /** diff --git a/Calorimeter/CaloRec/CaloRec/ToolWithConstantsMixin.icc b/Calorimeter/CaloRec/CaloRec/ToolWithConstantsMixin.icc index 89ff976865d123415a87f8ca7a2bfc7e99409e1b..febb8cf4745359ceaeb403aa44bde56a045d75f7 100644 --- a/Calorimeter/CaloRec/CaloRec/ToolWithConstantsMixin.icc +++ b/Calorimeter/CaloRec/CaloRec/ToolWithConstantsMixin.icc @@ -1,10 +1,9 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -// $Id: ToolWithConstantsMixin.icc,v 1.6 2009-04-18 02:56:16 ssnyder Exp $ /** * @file ToolWithConstantsMixin.icc * @author scott snyder <snyder@bnl.gov> @@ -76,14 +75,13 @@ StatusCode do_declare (ToolWithConstantsMixin* self, * be an instance of one of the @c Array<N> classes. */ template <class T> -StatusCode +void ToolWithConstantsMixin::declareConstant (const std::string& name, T& c, bool deflt /*= false*/) { c = T(); - CHECK( add_constant (makeinfo (name, c, deflt)) ); - return StatusCode (StatusCode::SUCCESS, true); + add_constant (makeinfo (name, c, deflt)); } diff --git a/Calorimeter/CaloRec/src/ToolWithConstantsMixin.cxx b/Calorimeter/CaloRec/src/ToolWithConstantsMixin.cxx index 17e9fae866938a25ff165c2002677269538ec983..c51928e24c04f953b90ef4f3f43a63c693c9e4c9 100755 --- a/Calorimeter/CaloRec/src/ToolWithConstantsMixin.cxx +++ b/Calorimeter/CaloRec/src/ToolWithConstantsMixin.cxx @@ -1,10 +1,9 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -// $Id: ToolWithConstantsMixin.cxx,v 1.12 2009-04-18 02:56:18 ssnyder Exp $ /** * @file ToolWithConstantsMixin.cxx * @author scott snyder <snyder@bnl.gov> @@ -386,10 +385,10 @@ ToolWithConstantsMixin::setProperty (const Property& p) * @brief Add a new constant to our store. * @param pi The @c Propinfo instance describing this constant. */ -StatusCode ToolWithConstantsMixin::add_constant (Propinfo_Base* pi) +void ToolWithConstantsMixin::add_constant (Propinfo_Base* pi) { if (!pi) - return StatusCode::FAILURE; + return; // Make sure that a name isn't duplicated. for (unsigned int i=0; i < m_infos.size(); i++) @@ -397,14 +396,13 @@ StatusCode ToolWithConstantsMixin::add_constant (Propinfo_Base* pi) REPORT_ERROR(StatusCode::FAILURE) << "Duplicate constant: " << pi->m_name; delete pi; - return StatusCode::FAILURE; + return; } // Record this declaration in @c m_infos. // @c makeinfo is one of an overloaded family of functions that // creates the @c Propinfo_* structure for the type of @a c. m_infos.push_back (pi); - return StatusCode::SUCCESS; }