diff --git a/ChemistryLib/PhreeqcIOData/CreateKineticReactant.cpp b/ChemistryLib/PhreeqcIOData/CreateKineticReactant.cpp index c740c6c3e8d68b1db1257ff3efd3c6a4b5778329..ac9be9045e42071c1070a325fc6f8d23d23b830e 100644 --- a/ChemistryLib/PhreeqcIOData/CreateKineticReactant.cpp +++ b/ChemistryLib/PhreeqcIOData/CreateKineticReactant.cpp @@ -40,8 +40,8 @@ std::vector<KineticReactant> createKineticReactants( auto parameters = //! \ogs_file_param{prj__chemical_system__kinetic_reactants__kinetic_reactant__parameters} - reactant_config.getConfigParameterOptional<std::vector<double>>( - "parameters"); + reactant_config.getConfigParameter<std::vector<double>>( + "parameters", {}); kinetic_reactants.emplace_back(std::move(name), std::move(chemical_formula), diff --git a/ChemistryLib/PhreeqcIOData/KineticReactant.h b/ChemistryLib/PhreeqcIOData/KineticReactant.h index 4cfd0325cd391b1eb184203f82e8ee7ee5cbc566..351c8e45aedac82fe1ef722fc385d3d69db30efa 100644 --- a/ChemistryLib/PhreeqcIOData/KineticReactant.h +++ b/ChemistryLib/PhreeqcIOData/KineticReactant.h @@ -20,16 +20,14 @@ namespace ChemistryLib { struct KineticReactant { - KineticReactant(std::string name_, + KineticReactant(std::string&& name_, std::string&& chemical_formula_, double amount_, - boost::optional<std::vector<double>> - parameters_) + std::vector<double>&& parameters_) : name(std::move(name_)), chemical_formula(std::move(chemical_formula_)), amount(amount_), - parameters(parameters_ ? std::move(*parameters_) - : std::vector<double>{}) + parameters(std::move(parameters_)) { }