From a17d5dd98f215ac12d6d1b364fc12ad9c8cc3f84 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <github@naumov.de> Date: Fri, 3 Apr 2020 23:31:49 +0200 Subject: [PATCH] [CL] Pass database as const&. Avoids string copy. --- ChemistryLib/PhreeqcKernel.cpp | 2 +- ChemistryLib/PhreeqcKernel.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChemistryLib/PhreeqcKernel.cpp b/ChemistryLib/PhreeqcKernel.cpp index 5648119467f..2d9cdf19345 100644 --- a/ChemistryLib/PhreeqcKernel.cpp +++ b/ChemistryLib/PhreeqcKernel.cpp @@ -26,7 +26,7 @@ PhreeqcKernel::PhreeqcKernel( std::size_t const num_chemical_systems, std::vector<std::pair<int, std::string>> const& process_id_to_component_name_map, - std::string const database, + std::string const& database, AqueousSolution aqueous_solution, std::unique_ptr<EquilibriumReactants>&& equilibrium_reactants, std::unique_ptr<Kinetics>&& kinetic_reactants, diff --git a/ChemistryLib/PhreeqcKernel.h b/ChemistryLib/PhreeqcKernel.h index c7b62005b80..de5ed34a844 100644 --- a/ChemistryLib/PhreeqcKernel.h +++ b/ChemistryLib/PhreeqcKernel.h @@ -35,7 +35,7 @@ public: PhreeqcKernel(std::size_t const num_chemical_systems, std::vector<std::pair<int, std::string>> const& process_id_to_component_name_map, - std::string const database, + std::string const& database, AqueousSolution aqueous_solution, std::unique_ptr<EquilibriumReactants>&& equilibrium_reactants, std::unique_ptr<Kinetics>&& kinetic_reactants, -- GitLab