Skip to content

Commit

Permalink
WIP: mark constructors as explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Mar 21, 2022
1 parent 660a0e1 commit 91b294e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion include/cantera/kinetics/Arrhenius.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class ArrheniusBase : public ReactionRate
setRateParameters(rate, units, rate_units);
}

ArrheniusBase(const AnyMap& node, const UnitStack& rate_units={}) : ArrheniusBase()
explicit ArrheniusBase(const AnyMap& node, const UnitStack& rate_units={})
: ArrheniusBase()
{
setParameters(node, rate_units);
}
Expand Down
4 changes: 3 additions & 1 deletion include/cantera/kinetics/BlowersMaselRate.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ class BlowersMaselRate : public ArrheniusBase
*/
BlowersMaselRate(double A, double b, double Ea0, double w);

BlowersMaselRate(const AnyMap& node, const UnitStack& rate_units={}) : BlowersMaselRate() {
explicit BlowersMaselRate(const AnyMap& node, const UnitStack& rate_units={})
: BlowersMaselRate()
{
setParameters(node, rate_units);
}

Expand Down
4 changes: 2 additions & 2 deletions include/cantera/kinetics/InterfaceRate.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class InterfaceRate : public RateType, public InterfaceRateBase
using RateType::RateType; // inherit constructors

//! Constructor based on AnyMap content
InterfaceRate(const AnyMap& node, const UnitStack& rate_units={}) {
explicit InterfaceRate(const AnyMap& node, const UnitStack& rate_units={}) {
setParameters(node, rate_units);
}

Expand Down Expand Up @@ -457,7 +457,7 @@ class StickingRate : public RateType, public StickingCoverage
using RateType::RateType; // inherit constructors

//! Constructor based on AnyMap content
StickingRate(const AnyMap& node, const UnitStack& rate_units={}) {
explicit StickingRate(const AnyMap& node, const UnitStack& rate_units={}) {
// sticking coefficients are dimensionless
setParameters(node, Units(1.0));
}
Expand Down

0 comments on commit 91b294e

Please sign in to comment.