diff --git a/include/cantera/kinetics/EdgeKinetics.h b/include/cantera/kinetics/EdgeKinetics.h index 19ee0fe36..c8de3099f 100644 --- a/include/cantera/kinetics/EdgeKinetics.h +++ b/include/cantera/kinetics/EdgeKinetics.h @@ -59,7 +59,7 @@ public: virtual Kinetics* duplMyselfAsKinetics(const std::vector & tpVector) const { EdgeKinetics* iK = new EdgeKinetics(*this); iK->assignShallowPointers(tpVector); - return dynamic_cast(iK); + return iK; } /** diff --git a/include/cantera/thermo/SpeciesThermoMgr.h b/include/cantera/thermo/SpeciesThermoMgr.h index f25104853..804d7ab0a 100644 --- a/include/cantera/thermo/SpeciesThermoMgr.h +++ b/include/cantera/thermo/SpeciesThermoMgr.h @@ -271,8 +271,7 @@ template SpeciesThermo* SpeciesThermoDuo::duplMyselfAsSpeciesThermo() const { - SpeciesThermoDuo *nt = new SpeciesThermoDuo(*this); - return (SpeciesThermo*) nt; + return new SpeciesThermoDuo(*this); } template diff --git a/src/equil/vcs_species_thermo.cpp b/src/equil/vcs_species_thermo.cpp index e4be883a3..6644c34b9 100644 --- a/src/equil/vcs_species_thermo.cpp +++ b/src/equil/vcs_species_thermo.cpp @@ -147,8 +147,7 @@ VCS_SPECIES_THERMO::operator=(const VCS_SPECIES_THERMO& b) VCS_SPECIES_THERMO* VCS_SPECIES_THERMO::duplMyselfAsVCS_SPECIES_THERMO() { - VCS_SPECIES_THERMO* ptr = new VCS_SPECIES_THERMO(*this); - return ptr; + return new VCS_SPECIES_THERMO(*this); } diff --git a/src/kinetics/AqueousKinetics.cpp b/src/kinetics/AqueousKinetics.cpp index babf76b5e..5301365cc 100644 --- a/src/kinetics/AqueousKinetics.cpp +++ b/src/kinetics/AqueousKinetics.cpp @@ -105,7 +105,7 @@ Kinetics* AqueousKinetics::duplMyselfAsKinetics(const std::vector & t { AqueousKinetics* gK = new AqueousKinetics(*this); gK->assignShallowPointers(tpVector); - return dynamic_cast(gK); + return gK; } //==================================================================================================================== diff --git a/src/kinetics/GasKinetics.cpp b/src/kinetics/GasKinetics.cpp index d0d04a2d3..186703cb7 100644 --- a/src/kinetics/GasKinetics.cpp +++ b/src/kinetics/GasKinetics.cpp @@ -141,7 +141,7 @@ Kinetics* GasKinetics::duplMyselfAsKinetics(const std::vector & tpVec { GasKinetics* gK = new GasKinetics(*this); gK->assignShallowPointers(tpVector); - return dynamic_cast(gK); + return gK; } //==================================================================================================================== /** diff --git a/src/kinetics/InterfaceKinetics.cpp b/src/kinetics/InterfaceKinetics.cpp index 4bbc99422..c191fe837 100644 --- a/src/kinetics/InterfaceKinetics.cpp +++ b/src/kinetics/InterfaceKinetics.cpp @@ -202,7 +202,7 @@ Kinetics* InterfaceKinetics::duplMyselfAsKinetics(const std::vector & { InterfaceKinetics* iK = new InterfaceKinetics(*this); iK->assignShallowPointers(tpVector); - return dynamic_cast(iK); + return iK; } //==================================================================================================================== // Set the electric potential in the nth phase diff --git a/src/numerics/BandMatrix.cpp b/src/numerics/BandMatrix.cpp index d2e06a310..ec729042c 100644 --- a/src/numerics/BandMatrix.cpp +++ b/src/numerics/BandMatrix.cpp @@ -498,8 +498,7 @@ size_t BandMatrix::checkColumns(doublereal& valueSmall) const //==================================================================================================================== GeneralMatrix* BandMatrix::duplMyselfAsGeneralMatrix() const { - BandMatrix* dd = new BandMatrix(*this); - return static_cast(dd); + return new BandMatrix(*this); } //==================================================================================================================== bool BandMatrix::factored() const diff --git a/src/numerics/ResidJacEval.cpp b/src/numerics/ResidJacEval.cpp index 43386aad4..17675fdd5 100644 --- a/src/numerics/ResidJacEval.cpp +++ b/src/numerics/ResidJacEval.cpp @@ -66,8 +66,7 @@ ResidJacEval& ResidJacEval::operator=(const ResidJacEval& right) */ ResidJacEval* ResidJacEval::duplMyselfAsResidJacEval() const { - ResidJacEval* ff = new ResidJacEval(*this); - return ff; + return new ResidJacEval(*this); } //==================================================================================================================== int ResidJacEval::nEquations() const diff --git a/src/numerics/SquareMatrix.cpp b/src/numerics/SquareMatrix.cpp index 63e4586d8..198a90b95 100644 --- a/src/numerics/SquareMatrix.cpp +++ b/src/numerics/SquareMatrix.cpp @@ -402,8 +402,7 @@ size_t SquareMatrix::nRowsAndStruct(size_t* const iStruct) const //===================================================================================================================== GeneralMatrix* SquareMatrix::duplMyselfAsGeneralMatrix() const { - SquareMatrix* dd = new SquareMatrix(*this); - return static_cast(dd); + return new SquareMatrix(*this); } //===================================================================================================================== // Return an iterator pointing to the first element diff --git a/src/thermo/ConstCpPoly.cpp b/src/thermo/ConstCpPoly.cpp index a7e196690..587282243 100644 --- a/src/thermo/ConstCpPoly.cpp +++ b/src/thermo/ConstCpPoly.cpp @@ -77,8 +77,7 @@ ConstCpPoly::~ConstCpPoly() {} SpeciesThermoInterpType* ConstCpPoly::duplMyselfAsSpeciesThermoInterpType() const { - ConstCpPoly* newCCP = new ConstCpPoly(*this); - return (SpeciesThermoInterpType*) newCCP; + return new ConstCpPoly(*this); } doublereal ConstCpPoly::minTemp() const diff --git a/src/thermo/DebyeHuckel.cpp b/src/thermo/DebyeHuckel.cpp index fdcdadf84..8c3dd95b3 100644 --- a/src/thermo/DebyeHuckel.cpp +++ b/src/thermo/DebyeHuckel.cpp @@ -211,8 +211,7 @@ DebyeHuckel::~DebyeHuckel() */ ThermoPhase* DebyeHuckel::duplMyselfAsThermoPhase() const { - DebyeHuckel* mtp = new DebyeHuckel(*this); - return (ThermoPhase*) mtp; + return new DebyeHuckel(*this); } /* diff --git a/src/thermo/FixedChemPotSSTP.cpp b/src/thermo/FixedChemPotSSTP.cpp index 540ab708e..f459eaa7d 100644 --- a/src/thermo/FixedChemPotSSTP.cpp +++ b/src/thermo/FixedChemPotSSTP.cpp @@ -190,8 +190,7 @@ FixedChemPotSSTP::~FixedChemPotSSTP() */ ThermoPhase* FixedChemPotSSTP::duplMyselfAsThermoPhase() const { - FixedChemPotSSTP* stp = new FixedChemPotSSTP(*this); - return (ThermoPhase*) stp; + return new FixedChemPotSSTP(*this); } //==================================================================================================================== diff --git a/src/thermo/GeneralSpeciesThermo.cpp b/src/thermo/GeneralSpeciesThermo.cpp index 1805f1712..944129075 100644 --- a/src/thermo/GeneralSpeciesThermo.cpp +++ b/src/thermo/GeneralSpeciesThermo.cpp @@ -92,8 +92,7 @@ GeneralSpeciesThermo::~GeneralSpeciesThermo() SpeciesThermo* GeneralSpeciesThermo::duplMyselfAsSpeciesThermo() const { - GeneralSpeciesThermo* gsth = new GeneralSpeciesThermo(*this); - return (SpeciesThermo*) gsth; + return new GeneralSpeciesThermo(*this); } diff --git a/src/thermo/GibbsExcessVPSSTP.cpp b/src/thermo/GibbsExcessVPSSTP.cpp index 5e019d565..7147beef0 100644 --- a/src/thermo/GibbsExcessVPSSTP.cpp +++ b/src/thermo/GibbsExcessVPSSTP.cpp @@ -108,8 +108,7 @@ GibbsExcessVPSSTP::~GibbsExcessVPSSTP() ThermoPhase* GibbsExcessVPSSTP::duplMyselfAsThermoPhase() const { - GibbsExcessVPSSTP* mtp = new GibbsExcessVPSSTP(*this); - return (ThermoPhase*) mtp; + return new GibbsExcessVPSSTP(*this); } /* diff --git a/src/thermo/HMWSoln.cpp b/src/thermo/HMWSoln.cpp index 3898099e7..9bc4d8e31 100644 --- a/src/thermo/HMWSoln.cpp +++ b/src/thermo/HMWSoln.cpp @@ -595,8 +595,7 @@ HMWSoln::~HMWSoln() */ ThermoPhase* HMWSoln::duplMyselfAsThermoPhase() const { - HMWSoln* mtp = new HMWSoln(*this); - return (ThermoPhase*) mtp; + return new HMWSoln(*this); } /* diff --git a/src/thermo/IdealGasPhase.cpp b/src/thermo/IdealGasPhase.cpp index 59eaf42fd..c47ce50f2 100644 --- a/src/thermo/IdealGasPhase.cpp +++ b/src/thermo/IdealGasPhase.cpp @@ -80,8 +80,7 @@ operator=(const IdealGasPhase& right) */ ThermoPhase* IdealGasPhase::duplMyselfAsThermoPhase() const { - ThermoPhase* igp = new IdealGasPhase(*this); - return (ThermoPhase*) igp; + return new IdealGasPhase(*this); } // Molar Thermodynamic Properties of the Solution ------------------ diff --git a/src/thermo/IdealMolalSoln.cpp b/src/thermo/IdealMolalSoln.cpp index 61507bbc2..65d73d707 100644 --- a/src/thermo/IdealMolalSoln.cpp +++ b/src/thermo/IdealMolalSoln.cpp @@ -167,8 +167,7 @@ IdealMolalSoln::~IdealMolalSoln() */ ThermoPhase* IdealMolalSoln::duplMyselfAsThermoPhase() const { - IdealMolalSoln* mtp = new IdealMolalSoln(*this); - return (ThermoPhase*) mtp; + return new IdealMolalSoln(*this); } // diff --git a/src/thermo/IdealSolidSolnPhase.cpp b/src/thermo/IdealSolidSolnPhase.cpp index da4443e58..e641f6337 100644 --- a/src/thermo/IdealSolidSolnPhase.cpp +++ b/src/thermo/IdealSolidSolnPhase.cpp @@ -119,8 +119,7 @@ operator=(const IdealSolidSolnPhase& b) */ ThermoPhase* IdealSolidSolnPhase::duplMyselfAsThermoPhase() const { - IdealSolidSolnPhase* ii = new IdealSolidSolnPhase(*this); - return (ThermoPhase*) ii; + return new IdealSolidSolnPhase(*this); } //==================================================================================================================== /** diff --git a/src/thermo/IdealSolnGasVPSS.cpp b/src/thermo/IdealSolnGasVPSS.cpp index 4fa8b5bdb..06019a3e0 100644 --- a/src/thermo/IdealSolnGasVPSS.cpp +++ b/src/thermo/IdealSolnGasVPSS.cpp @@ -107,8 +107,7 @@ IdealSolnGasVPSS::~IdealSolnGasVPSS() */ ThermoPhase* IdealSolnGasVPSS::duplMyselfAsThermoPhase() const { - IdealSolnGasVPSS* vptp = new IdealSolnGasVPSS(*this); - return (ThermoPhase*) vptp; + return new IdealSolnGasVPSS(*this); } int IdealSolnGasVPSS::eosType() const diff --git a/src/thermo/IonsFromNeutralVPSSTP.cpp b/src/thermo/IonsFromNeutralVPSSTP.cpp index 70d23c8ef..e697f748b 100644 --- a/src/thermo/IonsFromNeutralVPSSTP.cpp +++ b/src/thermo/IonsFromNeutralVPSSTP.cpp @@ -237,8 +237,7 @@ IonsFromNeutralVPSSTP::~IonsFromNeutralVPSSTP() ThermoPhase* IonsFromNeutralVPSSTP::duplMyselfAsThermoPhase() const { - IonsFromNeutralVPSSTP* mtp = new IonsFromNeutralVPSSTP(*this); - return (ThermoPhase*) mtp; + return new IonsFromNeutralVPSSTP(*this); } /* diff --git a/src/thermo/LatticePhase.cpp b/src/thermo/LatticePhase.cpp index 11dcb0f21..25cb58e95 100644 --- a/src/thermo/LatticePhase.cpp +++ b/src/thermo/LatticePhase.cpp @@ -113,8 +113,7 @@ LatticePhase::LatticePhase(XML_Node& phaseRef, const std::string& id) */ ThermoPhase* LatticePhase::duplMyselfAsThermoPhase() const { - LatticePhase* igp = new LatticePhase(*this); - return (ThermoPhase*) igp; + return new LatticePhase(*this); } doublereal LatticePhase::enthalpy_mole() const diff --git a/src/thermo/LatticeSolidPhase.cpp b/src/thermo/LatticeSolidPhase.cpp index 5ab58b6ee..2f98d51ea 100644 --- a/src/thermo/LatticeSolidPhase.cpp +++ b/src/thermo/LatticeSolidPhase.cpp @@ -97,8 +97,7 @@ LatticeSolidPhase::~LatticeSolidPhase() */ ThermoPhase* LatticeSolidPhase::duplMyselfAsThermoPhase() const { - LatticeSolidPhase* igp = new LatticeSolidPhase(*this); - return (ThermoPhase*) igp; + return new LatticeSolidPhase(*this); } //==================================================================================================================== diff --git a/src/thermo/MargulesVPSSTP.cpp b/src/thermo/MargulesVPSSTP.cpp index c8bac5abd..ae2e79d96 100644 --- a/src/thermo/MargulesVPSSTP.cpp +++ b/src/thermo/MargulesVPSSTP.cpp @@ -130,8 +130,7 @@ MargulesVPSSTP::~MargulesVPSSTP() ThermoPhase* MargulesVPSSTP::duplMyselfAsThermoPhase() const { - MargulesVPSSTP* mtp = new MargulesVPSSTP(*this); - return (ThermoPhase*) mtp; + return new MargulesVPSSTP(*this); } // Special constructor for a hard-coded problem diff --git a/src/thermo/MetalSHEelectrons.cpp b/src/thermo/MetalSHEelectrons.cpp index 6ef65962f..9758bc3f6 100644 --- a/src/thermo/MetalSHEelectrons.cpp +++ b/src/thermo/MetalSHEelectrons.cpp @@ -147,8 +147,7 @@ MetalSHEelectrons::operator=(const MetalSHEelectrons& right) */ ThermoPhase* MetalSHEelectrons::duplMyselfAsThermoPhase() const { - MetalSHEelectrons* stp = new MetalSHEelectrons(*this); - return (ThermoPhase*) stp; + return new MetalSHEelectrons(*this); } //==================================================================================================================== diff --git a/src/thermo/MineralEQ3.cpp b/src/thermo/MineralEQ3.cpp index 74fa0b7b7..15288f271 100644 --- a/src/thermo/MineralEQ3.cpp +++ b/src/thermo/MineralEQ3.cpp @@ -143,8 +143,7 @@ MineralEQ3::~MineralEQ3() */ ThermoPhase* MineralEQ3::duplMyselfAsThermoPhase() const { - MineralEQ3* stp = new MineralEQ3(*this); - return (ThermoPhase*) stp; + return new MineralEQ3(*this); } diff --git a/src/thermo/MixedSolventElectrolyte.cpp b/src/thermo/MixedSolventElectrolyte.cpp index 0d3cb9d2e..7dd6950f0 100644 --- a/src/thermo/MixedSolventElectrolyte.cpp +++ b/src/thermo/MixedSolventElectrolyte.cpp @@ -133,8 +133,7 @@ MixedSolventElectrolyte::~MixedSolventElectrolyte() ThermoPhase* MixedSolventElectrolyte::duplMyselfAsThermoPhase() const { - MixedSolventElectrolyte* mtp = new MixedSolventElectrolyte(*this); - return (ThermoPhase*) mtp; + return new MixedSolventElectrolyte(*this); } // Special constructor for a hard-coded problem diff --git a/src/thermo/MixtureFugacityTP.cpp b/src/thermo/MixtureFugacityTP.cpp index a589958bd..f8a4a0398 100644 --- a/src/thermo/MixtureFugacityTP.cpp +++ b/src/thermo/MixtureFugacityTP.cpp @@ -130,8 +130,7 @@ MixtureFugacityTP::~MixtureFugacityTP() */ ThermoPhase* MixtureFugacityTP::duplMyselfAsThermoPhase() const { - MixtureFugacityTP* vptp = new MixtureFugacityTP(*this); - return (ThermoPhase*) vptp; + return new MixtureFugacityTP(*this); } //==================================================================================================================== // This method returns the convention used in specification diff --git a/src/thermo/MolalityVPSSTP.cpp b/src/thermo/MolalityVPSSTP.cpp index ead8b9cbd..7aab875ca 100644 --- a/src/thermo/MolalityVPSSTP.cpp +++ b/src/thermo/MolalityVPSSTP.cpp @@ -113,8 +113,7 @@ MolalityVPSSTP::~MolalityVPSSTP() ThermoPhase* MolalityVPSSTP::duplMyselfAsThermoPhase() const { - MolalityVPSSTP* mtp = new MolalityVPSSTP(*this); - return (ThermoPhase*) mtp; + return new MolalityVPSSTP(*this); } /* diff --git a/src/thermo/MolarityIonicVPSSTP.cpp b/src/thermo/MolarityIonicVPSSTP.cpp index e31221535..ce97dc184 100644 --- a/src/thermo/MolarityIonicVPSSTP.cpp +++ b/src/thermo/MolarityIonicVPSSTP.cpp @@ -147,8 +147,7 @@ MolarityIonicVPSSTP::~MolarityIonicVPSSTP() ThermoPhase* MolarityIonicVPSSTP::duplMyselfAsThermoPhase() const { - MolarityIonicVPSSTP* mtp = new MolarityIonicVPSSTP(*this); - return (ThermoPhase*) mtp; + return new MolarityIonicVPSSTP(*this); } /* diff --git a/src/thermo/Mu0Poly.cpp b/src/thermo/Mu0Poly.cpp index 6ded6bf19..8077470ea 100644 --- a/src/thermo/Mu0Poly.cpp +++ b/src/thermo/Mu0Poly.cpp @@ -104,8 +104,7 @@ Mu0Poly::~Mu0Poly() SpeciesThermoInterpType* Mu0Poly::duplMyselfAsSpeciesThermoInterpType() const { - Mu0Poly* mp = new Mu0Poly(*this); - return (SpeciesThermoInterpType*) mp; + return new Mu0Poly(*this); } doublereal Mu0Poly::minTemp() const diff --git a/src/thermo/Nasa9Poly1.cpp b/src/thermo/Nasa9Poly1.cpp index a6bc4f0f8..29aaffc7f 100644 --- a/src/thermo/Nasa9Poly1.cpp +++ b/src/thermo/Nasa9Poly1.cpp @@ -131,8 +131,7 @@ Nasa9Poly1::~Nasa9Poly1() SpeciesThermoInterpType* Nasa9Poly1::duplMyselfAsSpeciesThermoInterpType() const { - Nasa9Poly1* np = new Nasa9Poly1(*this); - return (SpeciesThermoInterpType*) np; + return new Nasa9Poly1(*this); } // Returns the minimum temperature that the thermo diff --git a/src/thermo/Nasa9PolyMultiTempRegion.cpp b/src/thermo/Nasa9PolyMultiTempRegion.cpp index 00c86d1ad..7f0dd2ace 100644 --- a/src/thermo/Nasa9PolyMultiTempRegion.cpp +++ b/src/thermo/Nasa9PolyMultiTempRegion.cpp @@ -192,8 +192,7 @@ Nasa9PolyMultiTempRegion::~Nasa9PolyMultiTempRegion() SpeciesThermoInterpType* Nasa9PolyMultiTempRegion::duplMyselfAsSpeciesThermoInterpType() const { - Nasa9PolyMultiTempRegion* np = new Nasa9PolyMultiTempRegion(*this); - return (SpeciesThermoInterpType*) np; + return new Nasa9PolyMultiTempRegion(*this); } // Returns the minimum temperature that the thermo diff --git a/src/thermo/PDSS.cpp b/src/thermo/PDSS.cpp index c001449d7..8cce79e74 100644 --- a/src/thermo/PDSS.cpp +++ b/src/thermo/PDSS.cpp @@ -183,8 +183,7 @@ PDSS::~PDSS() */ PDSS* PDSS::duplMyselfAsPDSS() const { - PDSS* ip = new PDSS(*this); - return ip; + return new PDSS(*this); } // Returns the type of the standard state parameterization diff --git a/src/thermo/PDSS_ConstVol.cpp b/src/thermo/PDSS_ConstVol.cpp index 81d216176..e574e603e 100644 --- a/src/thermo/PDSS_ConstVol.cpp +++ b/src/thermo/PDSS_ConstVol.cpp @@ -82,8 +82,7 @@ PDSS_ConstVol::~PDSS_ConstVol() // Duplicator PDSS* PDSS_ConstVol::duplMyselfAsPDSS() const { - PDSS_ConstVol* idg = new PDSS_ConstVol(*this); - return (PDSS*) idg; + return new PDSS_ConstVol(*this); } /* diff --git a/src/thermo/PDSS_HKFT.cpp b/src/thermo/PDSS_HKFT.cpp index 9f8dacf48..b9c1affe6 100644 --- a/src/thermo/PDSS_HKFT.cpp +++ b/src/thermo/PDSS_HKFT.cpp @@ -213,8 +213,7 @@ PDSS_HKFT::~PDSS_HKFT() // Duplicator PDSS* PDSS_HKFT::duplMyselfAsPDSS() const { - PDSS_HKFT* idg = new PDSS_HKFT(*this); - return (PDSS*) idg; + return new PDSS_HKFT(*this); } /* diff --git a/src/thermo/PDSS_IdealGas.cpp b/src/thermo/PDSS_IdealGas.cpp index 72f7f3613..299cc2609 100644 --- a/src/thermo/PDSS_IdealGas.cpp +++ b/src/thermo/PDSS_IdealGas.cpp @@ -90,8 +90,7 @@ PDSS_IdealGas::~PDSS_IdealGas() // Duplicator PDSS* PDSS_IdealGas::duplMyselfAsPDSS() const { - PDSS_IdealGas* idg = new PDSS_IdealGas(*this); - return (PDSS*) idg; + return new PDSS_IdealGas(*this); } diff --git a/src/thermo/PDSS_IonsFromNeutral.cpp b/src/thermo/PDSS_IonsFromNeutral.cpp index 480777fca..fc0bd21b9 100644 --- a/src/thermo/PDSS_IonsFromNeutral.cpp +++ b/src/thermo/PDSS_IonsFromNeutral.cpp @@ -114,8 +114,7 @@ PDSS_IonsFromNeutral::~PDSS_IonsFromNeutral() //! Duplicator PDSS* PDSS_IonsFromNeutral::duplMyselfAsPDSS() const { - PDSS_IonsFromNeutral* idg = new PDSS_IonsFromNeutral(*this); - return (PDSS*) idg; + return new PDSS_IonsFromNeutral(*this); } //==================================================================================================================== void PDSS_IonsFromNeutral::initAllPtrs(VPStandardStateTP* tp, VPSSMgr* vpssmgr_ptr, diff --git a/src/thermo/PDSS_SSVol.cpp b/src/thermo/PDSS_SSVol.cpp index 649a22f54..19e4c5f3a 100644 --- a/src/thermo/PDSS_SSVol.cpp +++ b/src/thermo/PDSS_SSVol.cpp @@ -96,8 +96,7 @@ PDSS_SSVol::~PDSS_SSVol() //! Duplicator PDSS* PDSS_SSVol::duplMyselfAsPDSS() const { - PDSS_SSVol* idg = new PDSS_SSVol(*this); - return (PDSS*) idg; + return new PDSS_SSVol(*this); } /* diff --git a/src/thermo/PDSS_Water.cpp b/src/thermo/PDSS_Water.cpp index a00a20d07..0ce2ccb95 100644 --- a/src/thermo/PDSS_Water.cpp +++ b/src/thermo/PDSS_Water.cpp @@ -175,8 +175,7 @@ PDSS_Water::~PDSS_Water() PDSS* PDSS_Water::duplMyselfAsPDSS() const { - PDSS_Water* kPDSS = new PDSS_Water(*this); - return (PDSS*) kPDSS; + return new PDSS_Water(*this); } /* diff --git a/src/thermo/PhaseCombo_Interaction.cpp b/src/thermo/PhaseCombo_Interaction.cpp index 0ffe62783..9169a1841 100644 --- a/src/thermo/PhaseCombo_Interaction.cpp +++ b/src/thermo/PhaseCombo_Interaction.cpp @@ -143,8 +143,7 @@ PhaseCombo_Interaction::~PhaseCombo_Interaction() ThermoPhase* PhaseCombo_Interaction::duplMyselfAsThermoPhase() const { - PhaseCombo_Interaction* mtp = new PhaseCombo_Interaction(*this); - return (ThermoPhase*) mtp; + return new PhaseCombo_Interaction(*this); } //==================================================================================================================== // Special constructor for a hard-coded problem diff --git a/src/thermo/PseudoBinaryVPSSTP.cpp b/src/thermo/PseudoBinaryVPSSTP.cpp index 7830eb416..4740d2edd 100644 --- a/src/thermo/PseudoBinaryVPSSTP.cpp +++ b/src/thermo/PseudoBinaryVPSSTP.cpp @@ -115,8 +115,7 @@ PseudoBinaryVPSSTP::~PseudoBinaryVPSSTP() ThermoPhase* PseudoBinaryVPSSTP::duplMyselfAsThermoPhase() const { - PseudoBinaryVPSSTP* mtp = new PseudoBinaryVPSSTP(*this); - return (ThermoPhase*) mtp; + return new PseudoBinaryVPSSTP(*this); } /* diff --git a/src/thermo/PureFluidPhase.cpp b/src/thermo/PureFluidPhase.cpp index 07c83175f..74132dabe 100644 --- a/src/thermo/PureFluidPhase.cpp +++ b/src/thermo/PureFluidPhase.cpp @@ -72,8 +72,7 @@ PureFluidPhase& PureFluidPhase::operator=(const PureFluidPhase& right) */ ThermoPhase* PureFluidPhase::duplMyselfAsThermoPhase() const { - PureFluidPhase* igp = new PureFluidPhase(*this); - return (ThermoPhase*) igp; + return new PureFluidPhase(*this); } diff --git a/src/thermo/RedlichKisterVPSSTP.cpp b/src/thermo/RedlichKisterVPSSTP.cpp index c61fa6d89..09cbf8584 100644 --- a/src/thermo/RedlichKisterVPSSTP.cpp +++ b/src/thermo/RedlichKisterVPSSTP.cpp @@ -208,8 +208,7 @@ RedlichKisterVPSSTP::~RedlichKisterVPSSTP() ThermoPhase* RedlichKisterVPSSTP::duplMyselfAsThermoPhase() const { - RedlichKisterVPSSTP* mtp = new RedlichKisterVPSSTP(*this); - return (ThermoPhase*) mtp; + return new RedlichKisterVPSSTP(*this); } //==================================================================================================================== diff --git a/src/thermo/RedlichKwongMFTP.cpp b/src/thermo/RedlichKwongMFTP.cpp index a0404f5be..38596a036 100644 --- a/src/thermo/RedlichKwongMFTP.cpp +++ b/src/thermo/RedlichKwongMFTP.cpp @@ -252,8 +252,7 @@ RedlichKwongMFTP::~RedlichKwongMFTP() */ ThermoPhase* RedlichKwongMFTP::duplMyselfAsThermoPhase() const { - RedlichKwongMFTP* vptp = new RedlichKwongMFTP(*this); - return (ThermoPhase*) vptp; + return new RedlichKwongMFTP(*this); } //==================================================================================================================== int RedlichKwongMFTP::eosType() const diff --git a/src/thermo/SingleSpeciesTP.cpp b/src/thermo/SingleSpeciesTP.cpp index fe7b469f3..862391bb4 100644 --- a/src/thermo/SingleSpeciesTP.cpp +++ b/src/thermo/SingleSpeciesTP.cpp @@ -92,8 +92,7 @@ SingleSpeciesTP::~SingleSpeciesTP() */ ThermoPhase* SingleSpeciesTP::duplMyselfAsThermoPhase() const { - SingleSpeciesTP* stp = new SingleSpeciesTP(*this); - return (ThermoPhase*) stp; + return new SingleSpeciesTP(*this); } /** diff --git a/src/thermo/SpeciesThermoInterpType.cpp b/src/thermo/SpeciesThermoInterpType.cpp index 457bd41a6..0e2a41dc5 100644 --- a/src/thermo/SpeciesThermoInterpType.cpp +++ b/src/thermo/SpeciesThermoInterpType.cpp @@ -75,8 +75,7 @@ STITbyPDSS::~STITbyPDSS() SpeciesThermoInterpType* STITbyPDSS::duplMyselfAsSpeciesThermoInterpType() const { - STITbyPDSS* np = new STITbyPDSS(*this); - return (SpeciesThermoInterpType*) np; + return new STITbyPDSS(*this); } diff --git a/src/thermo/StatMech.cpp b/src/thermo/StatMech.cpp index 6bd0f00f5..3f92fa777 100644 --- a/src/thermo/StatMech.cpp +++ b/src/thermo/StatMech.cpp @@ -87,8 +87,7 @@ StatMech::~StatMech() SpeciesThermoInterpType* StatMech::duplMyselfAsSpeciesThermoInterpType() const { - StatMech* np = new StatMech(*this); - return (SpeciesThermoInterpType*) np; + return new StatMech(*this); } // Returns the minimum temperature that the thermo diff --git a/src/thermo/StoichSubstance.cpp b/src/thermo/StoichSubstance.cpp index c13a374fc..bd9aa3285 100644 --- a/src/thermo/StoichSubstance.cpp +++ b/src/thermo/StoichSubstance.cpp @@ -81,8 +81,7 @@ operator=(const StoichSubstance& right) */ ThermoPhase* StoichSubstance::duplMyselfAsThermoPhase() const { - ThermoPhase* igp = new StoichSubstance(*this); - return (ThermoPhase*) igp; + return new StoichSubstance(*this); } // Destructor diff --git a/src/thermo/StoichSubstanceSSTP.cpp b/src/thermo/StoichSubstanceSSTP.cpp index 00164c532..0b2a1efa0 100644 --- a/src/thermo/StoichSubstanceSSTP.cpp +++ b/src/thermo/StoichSubstanceSSTP.cpp @@ -129,8 +129,7 @@ StoichSubstanceSSTP::~StoichSubstanceSSTP() */ ThermoPhase* StoichSubstanceSSTP::duplMyselfAsThermoPhase() const { - StoichSubstanceSSTP* stp = new StoichSubstanceSSTP(*this); - return (ThermoPhase*) stp; + return new StoichSubstanceSSTP(*this); } diff --git a/src/thermo/SurfPhase.cpp b/src/thermo/SurfPhase.cpp index e5bb41c77..cb40c6976 100644 --- a/src/thermo/SurfPhase.cpp +++ b/src/thermo/SurfPhase.cpp @@ -145,8 +145,7 @@ operator=(const SurfPhase& right) */ ThermoPhase* SurfPhase::duplMyselfAsThermoPhase() const { - SurfPhase* igp = new SurfPhase(*this); - return (ThermoPhase*) igp; + return new SurfPhase(*this); } doublereal SurfPhase:: @@ -516,8 +515,7 @@ EdgePhase& EdgePhase::operator=(const EdgePhase& right) */ ThermoPhase* EdgePhase::duplMyselfAsThermoPhase() const { - EdgePhase* igp = new EdgePhase(*this); - return (ThermoPhase*) igp; + return new EdgePhase(*this); } void EdgePhase:: diff --git a/src/thermo/ThermoPhase.cpp b/src/thermo/ThermoPhase.cpp index f892ad688..fc5c31d1b 100644 --- a/src/thermo/ThermoPhase.cpp +++ b/src/thermo/ThermoPhase.cpp @@ -137,8 +137,7 @@ operator=(const ThermoPhase& right) */ ThermoPhase* ThermoPhase::duplMyselfAsThermoPhase() const { - ThermoPhase* tp = new ThermoPhase(*this); - return tp; + return new ThermoPhase(*this); } //==================================================================================================================== int ThermoPhase::activityConvention() const diff --git a/src/thermo/VPSSMgr.cpp b/src/thermo/VPSSMgr.cpp index 7b5c028d5..a84e0ebb0 100644 --- a/src/thermo/VPSSMgr.cpp +++ b/src/thermo/VPSSMgr.cpp @@ -125,8 +125,7 @@ VPSSMgr::operator=(const VPSSMgr& right) //==================================================================================================================== VPSSMgr* VPSSMgr::duplMyselfAsVPSSMgr() const { - VPSSMgr* vp = new VPSSMgr(*this); - return vp; + return new VPSSMgr(*this); } //==================================================================================================================== void VPSSMgr::initAllPtrs(VPStandardStateTP* vp_ptr, diff --git a/src/thermo/VPSSMgr_ConstVol.cpp b/src/thermo/VPSSMgr_ConstVol.cpp index 9e8733b90..8f656133c 100644 --- a/src/thermo/VPSSMgr_ConstVol.cpp +++ b/src/thermo/VPSSMgr_ConstVol.cpp @@ -55,8 +55,7 @@ VPSSMgr_ConstVol& VPSSMgr_ConstVol::operator=(const VPSSMgr_ConstVol& b) VPSSMgr* VPSSMgr_ConstVol::duplMyselfAsVPSSMgr() const { - VPSSMgr_ConstVol* vpm = new VPSSMgr_ConstVol(*this); - return (VPSSMgr*) vpm; + return new VPSSMgr_ConstVol(*this); } /* diff --git a/src/thermo/VPSSMgr_General.cpp b/src/thermo/VPSSMgr_General.cpp index be7eae1ed..ea97c5c86 100644 --- a/src/thermo/VPSSMgr_General.cpp +++ b/src/thermo/VPSSMgr_General.cpp @@ -73,8 +73,7 @@ VPSSMgr_General& VPSSMgr_General::operator=(const VPSSMgr_General& b) VPSSMgr* VPSSMgr_General::duplMyselfAsVPSSMgr() const { - VPSSMgr_General* vpm = new VPSSMgr_General(*this); - return (VPSSMgr*) vpm; + return new VPSSMgr_General(*this); } //==================================================================================================================== // Initialize the internal shallow pointers in this object diff --git a/src/thermo/VPSSMgr_IdealGas.cpp b/src/thermo/VPSSMgr_IdealGas.cpp index 86f482bee..36dd84462 100644 --- a/src/thermo/VPSSMgr_IdealGas.cpp +++ b/src/thermo/VPSSMgr_IdealGas.cpp @@ -56,8 +56,7 @@ VPSSMgr_IdealGas& VPSSMgr_IdealGas::operator=(const VPSSMgr_IdealGas& b) VPSSMgr* VPSSMgr_IdealGas::duplMyselfAsVPSSMgr() const { - VPSSMgr_IdealGas* vpm = new VPSSMgr_IdealGas(*this); - return (VPSSMgr*) vpm; + return new VPSSMgr_IdealGas(*this); } diff --git a/src/thermo/VPSSMgr_Water_ConstVol.cpp b/src/thermo/VPSSMgr_Water_ConstVol.cpp index 99a3a6435..5c13b2ed1 100644 --- a/src/thermo/VPSSMgr_Water_ConstVol.cpp +++ b/src/thermo/VPSSMgr_Water_ConstVol.cpp @@ -60,8 +60,7 @@ VPSSMgr_Water_ConstVol::operator=(const VPSSMgr_Water_ConstVol& b) VPSSMgr* VPSSMgr_Water_ConstVol::duplMyselfAsVPSSMgr() const { - VPSSMgr_Water_ConstVol* vpm = new VPSSMgr_Water_ConstVol(*this); - return (VPSSMgr*) vpm; + return new VPSSMgr_Water_ConstVol(*this); } void diff --git a/src/thermo/VPSSMgr_Water_HKFT.cpp b/src/thermo/VPSSMgr_Water_HKFT.cpp index 46256c091..50d551c8b 100644 --- a/src/thermo/VPSSMgr_Water_HKFT.cpp +++ b/src/thermo/VPSSMgr_Water_HKFT.cpp @@ -66,8 +66,7 @@ VPSSMgr_Water_HKFT::operator=(const VPSSMgr_Water_HKFT& b) VPSSMgr* VPSSMgr_Water_HKFT::duplMyselfAsVPSSMgr() const { - VPSSMgr_Water_HKFT* vpm = new VPSSMgr_Water_HKFT(*this); - return (VPSSMgr*) vpm; + return new VPSSMgr_Water_HKFT(*this); } void diff --git a/src/thermo/VPStandardStateTP.cpp b/src/thermo/VPStandardStateTP.cpp index ff34636d7..7605e85f1 100644 --- a/src/thermo/VPStandardStateTP.cpp +++ b/src/thermo/VPStandardStateTP.cpp @@ -144,8 +144,7 @@ VPStandardStateTP::~VPStandardStateTP() */ ThermoPhase* VPStandardStateTP::duplMyselfAsThermoPhase() const { - VPStandardStateTP* vptp = new VPStandardStateTP(*this); - return (ThermoPhase*) vptp; + return new VPStandardStateTP(*this); } // This method returns the convention used in specification diff --git a/src/thermo/WaterSSTP.cpp b/src/thermo/WaterSSTP.cpp index 28c3d7b07..4cc682a4d 100644 --- a/src/thermo/WaterSSTP.cpp +++ b/src/thermo/WaterSSTP.cpp @@ -113,8 +113,7 @@ WaterSSTP& WaterSSTP::operator=(const WaterSSTP& b) ThermoPhase* WaterSSTP::duplMyselfAsThermoPhase() const { - WaterSSTP* wtp = new WaterSSTP(*this); - return (ThermoPhase*) wtp; + return new WaterSSTP(*this); } WaterSSTP::~WaterSSTP() diff --git a/src/transport/DustyGasTransport.cpp b/src/transport/DustyGasTransport.cpp index 9c64f62e0..5e204ccf3 100644 --- a/src/transport/DustyGasTransport.cpp +++ b/src/transport/DustyGasTransport.cpp @@ -125,8 +125,7 @@ DustyGasTransport::~DustyGasTransport() */ Transport* DustyGasTransport::duplMyselfAsTransport() const { - DustyGasTransport* tr = new DustyGasTransport(*this); - return (dynamic_cast(tr)); + return new DustyGasTransport(*this); } //==================================================================================================================== // Set the Parameters in the model diff --git a/src/transport/LTPspecies.cpp b/src/transport/LTPspecies.cpp index 9e140a13c..788373d53 100644 --- a/src/transport/LTPspecies.cpp +++ b/src/transport/LTPspecies.cpp @@ -103,8 +103,7 @@ LTPspecies& LTPspecies::operator=(const LTPspecies& right) */ LTPspecies* LTPspecies::duplMyselfAsLTPspecies() const { - LTPspecies* prp = new LTPspecies(*this); - return prp; + return new LTPspecies(*this); } //==================================================================================================================== LTPspecies::~LTPspecies() @@ -190,8 +189,7 @@ LTPspecies_Const::~LTPspecies_Const() */ LTPspecies* LTPspecies_Const::duplMyselfAsLTPspecies() const { - LTPspecies_Const* prp = new LTPspecies_Const(*this); - return (dynamic_cast(prp)); + return new LTPspecies_Const(*this); } //==================================================================================================================== // Return the (constant) value for this transport property @@ -266,8 +264,7 @@ LTPspecies_Arrhenius::~LTPspecies_Arrhenius() */ LTPspecies* LTPspecies_Arrhenius::duplMyselfAsLTPspecies() const { - LTPspecies_Arrhenius* prp = new LTPspecies_Arrhenius(*this); - return (dynamic_cast(prp)); + return new LTPspecies_Arrhenius(*this); } //=================================================================================================================== // Return the pure species value for this transport property evaluated @@ -367,8 +364,7 @@ LTPspecies_Poly::~LTPspecies_Poly() */ LTPspecies* LTPspecies_Poly::duplMyselfAsLTPspecies() const { - LTPspecies_Poly* prp = new LTPspecies_Poly(*this); - return (dynamic_cast(prp)); + return new LTPspecies_Poly(*this); } //==================================================================================================================== // Return the value for this transport property evaluated from the polynomial expression @@ -440,8 +436,7 @@ LTPspecies_ExpT::~LTPspecies_ExpT() */ LTPspecies* LTPspecies_ExpT::duplMyselfAsLTPspecies() const { - LTPspecies_ExpT* prp = new LTPspecies_ExpT(*this); - return (dynamic_cast(prp)); + return new LTPspecies_ExpT(*this); } //==================================================================================================================== // Return the value for this transport property evaluated diff --git a/src/transport/LiquidTransport.cpp b/src/transport/LiquidTransport.cpp index 2a5f3e145..ee835ea1b 100644 --- a/src/transport/LiquidTransport.cpp +++ b/src/transport/LiquidTransport.cpp @@ -212,8 +212,7 @@ LiquidTransport& LiquidTransport::operator=(const LiquidTransport& right) Transport* LiquidTransport::duplMyselfAsTransport() const { - LiquidTransport* tr = new LiquidTransport(*this); - return (dynamic_cast(tr)); + return new LiquidTransport(*this); } LiquidTransport::~LiquidTransport() diff --git a/src/transport/MixTransport.cpp b/src/transport/MixTransport.cpp index 523f56245..be37ee7eb 100644 --- a/src/transport/MixTransport.cpp +++ b/src/transport/MixTransport.cpp @@ -84,8 +84,7 @@ MixTransport& MixTransport::operator=(const MixTransport& right) */ Transport* MixTransport::duplMyselfAsTransport() const { - MixTransport* tr = new MixTransport(*this); - return (dynamic_cast(tr)); + return new MixTransport(*this); } //==================================================================================================================== diff --git a/src/transport/SimpleTransport.cpp b/src/transport/SimpleTransport.cpp index ce1d8d60d..0f1636452 100644 --- a/src/transport/SimpleTransport.cpp +++ b/src/transport/SimpleTransport.cpp @@ -159,8 +159,7 @@ SimpleTransport& SimpleTransport::operator=(const SimpleTransport& right) //================================================================================================ Transport* SimpleTransport::duplMyselfAsTransport() const { - SimpleTransport* tr = new SimpleTransport(*this); - return (dynamic_cast(tr)); + return new SimpleTransport(*this); } //================================================================================================ SimpleTransport::~SimpleTransport() diff --git a/src/transport/SolidTransport.cpp b/src/transport/SolidTransport.cpp index e5a20338d..d652da3e1 100644 --- a/src/transport/SolidTransport.cpp +++ b/src/transport/SolidTransport.cpp @@ -74,8 +74,7 @@ SolidTransport& SolidTransport::operator=(const SolidTransport& b) //==================================================================================================================== Transport* SolidTransport::duplMyselfAsTransport() const { - SolidTransport* tr = new SolidTransport(*this); - return (dynamic_cast(tr)); + return new SolidTransport(*this); } //==================================================================================================================== void SolidTransport::setParameters(const int n, const int k, const doublereal* const p) diff --git a/src/transport/TortuosityBase.cpp b/src/transport/TortuosityBase.cpp index 0e62845b0..500a64dbc 100644 --- a/src/transport/TortuosityBase.cpp +++ b/src/transport/TortuosityBase.cpp @@ -62,8 +62,7 @@ TortuosityBase& TortuosityBase::operator=(const TortuosityBase& right) */ TortuosityBase* TortuosityBase::duplMyselfAsTortuosityBase() const { - TortuosityBase* tb = new TortuosityBase(*this); - return tb; + return new TortuosityBase(*this); } //==================================================================================================================== // The tortuosity factor models the effective increase in the diffusive transport length. diff --git a/src/transport/TortuosityBruggeman.cpp b/src/transport/TortuosityBruggeman.cpp index 1aa26a174..1bbb86279 100644 --- a/src/transport/TortuosityBruggeman.cpp +++ b/src/transport/TortuosityBruggeman.cpp @@ -66,8 +66,7 @@ TortuosityBruggeman& TortuosityBruggeman::operator=(const TortuosityBruggeman& */ TortuosityBase* TortuosityBruggeman::duplMyselfAsTortuosityBase() const { - TortuosityBruggeman* tb = new TortuosityBruggeman(*this); - return dynamic_cast(tb); + return new TortuosityBruggeman(*this); } //==================================================================================================================== // The tortuosity factor models the effective increase in the diffusive transport length. diff --git a/src/transport/TortuosityMaxwell.cpp b/src/transport/TortuosityMaxwell.cpp index 3454996b8..8ed8a8817 100644 --- a/src/transport/TortuosityMaxwell.cpp +++ b/src/transport/TortuosityMaxwell.cpp @@ -66,8 +66,7 @@ TortuosityMaxwell& TortuosityMaxwell::operator=(const TortuosityMaxwell& right */ TortuosityBase* TortuosityMaxwell::duplMyselfAsTortuosityBase() const { - TortuosityMaxwell* tb = new TortuosityMaxwell(*this); - return dynamic_cast(tb); + return new TortuosityMaxwell(*this); } //==================================================================================================================== // The tortuosity factor models the effective increase in the diffusive transport length. diff --git a/src/transport/TortuosityPercolation.cpp b/src/transport/TortuosityPercolation.cpp index 3a0aa3f35..dadaa1be6 100644 --- a/src/transport/TortuosityPercolation.cpp +++ b/src/transport/TortuosityPercolation.cpp @@ -70,8 +70,7 @@ TortuosityPercolation& TortuosityPercolation::operator=(const TortuosityPercolat */ TortuosityBase* TortuosityPercolation::duplMyselfAsTortuosityBase() const { - TortuosityPercolation* tb = new TortuosityPercolation(*this); - return dynamic_cast(tb); + return new TortuosityPercolation(*this); } //==================================================================================================================== // The tortuosity factor models the effective increase in the diffusive transport length. diff --git a/src/transport/TransportBase.cpp b/src/transport/TransportBase.cpp index ab413b456..25cc4cd06 100644 --- a/src/transport/TransportBase.cpp +++ b/src/transport/TransportBase.cpp @@ -63,8 +63,7 @@ Transport& Transport::operator=(const Transport& right) Transport* Transport::duplMyselfAsTransport() const { - Transport* tr = new Transport(*this); - return tr; + return new Transport(*this); } diff --git a/src/transport/WaterTransport.cpp b/src/transport/WaterTransport.cpp index ceb010ced..9061af30d 100644 --- a/src/transport/WaterTransport.cpp +++ b/src/transport/WaterTransport.cpp @@ -65,8 +65,7 @@ WaterTransport& WaterTransport::operator=(const WaterTransport& right) */ Transport* WaterTransport::duplMyselfAsTransport() const { - WaterTransport* tr = new WaterTransport(*this); - return dynamic_cast(tr); + return new WaterTransport(*this); }