From 55fab6ca835020e634c8f3d810f3d52eb2870182 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 3 Oct 2014 22:15:08 +0000 Subject: [PATCH] Deprecate unused return value of importPhase --- include/cantera/thermo/ThermoFactory.h | 3 +++ src/thermo/HMWSoln_input.cpp | 6 +----- src/thermo/IonsFromNeutralVPSSTP.cpp | 7 +------ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/include/cantera/thermo/ThermoFactory.h b/include/cantera/thermo/ThermoFactory.h index 5ea3e025d..429cce539 100644 --- a/include/cantera/thermo/ThermoFactory.h +++ b/include/cantera/thermo/ThermoFactory.h @@ -227,6 +227,9 @@ ThermoPhase* newPhase(const std::string& infile, std::string id=""); * created. * * @ingroup thermoprops + * + * @deprecated: The return value of this function is always 'true'. After + * Cantera 2.2, this function will return 'void'. */ bool importPhase(XML_Node& phase, ThermoPhase* th, SpeciesThermoFactory* spfactory = 0); diff --git a/src/thermo/HMWSoln_input.cpp b/src/thermo/HMWSoln_input.cpp index e1312b922..eef955775 100644 --- a/src/thermo/HMWSoln_input.cpp +++ b/src/thermo/HMWSoln_input.cpp @@ -1125,11 +1125,7 @@ void HMWSoln::constructPhaseXML(XML_Node& phaseNode, std::string id_) * all of the species into the phase. This will also handle * all of the solvent and solute standard states */ - bool m_ok = importPhase(phaseNode, this); - if (!m_ok) { - throw CanteraError("HMWSoln::constructPhaseXML","importPhase failed "); - } - + importPhase(phaseNode, this); } void HMWSoln::initThermoXML(XML_Node& phaseNode, const std::string& id_) diff --git a/src/thermo/IonsFromNeutralVPSSTP.cpp b/src/thermo/IonsFromNeutralVPSSTP.cpp index 81c86d826..a9b785b10 100644 --- a/src/thermo/IonsFromNeutralVPSSTP.cpp +++ b/src/thermo/IonsFromNeutralVPSSTP.cpp @@ -282,12 +282,7 @@ void IonsFromNeutralVPSSTP::constructPhaseXML(XML_Node& phaseNode, std::string i * all of the species into the phase. This will also handle * all of the solvent and solute standard states */ - bool m_ok = importPhase(phaseNode, this); - if (!m_ok) { - throw CanteraError("IonsFromNeutralVPSSTP::constructPhaseXML", - "importPhase failed "); - } - + importPhase(phaseNode, this); } /*