From: David Wells Date: Sat, 9 Jan 2016 20:04:16 +0000 (-0500) Subject: Use a constant reference for a string. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76b2f533413890018a421120bd7cf0bc6edf61a5;p=code-gallery.git Use a constant reference for a string. --- diff --git a/cdr/common/include/deal.II-cdr/parameters.h b/cdr/common/include/deal.II-cdr/parameters.h index ddf2d15..83e21bf 100644 --- a/cdr/common/include/deal.II-cdr/parameters.h +++ b/cdr/common/include/deal.II-cdr/parameters.h @@ -36,7 +36,7 @@ namespace CDR unsigned int save_interval; unsigned int patch_level; - void read_parameter_file(std::string file_name); + void read_parameter_file(const std::string &file_name); private: void configure_parameter_handler(ParameterHandler ¶meter_handler); }; diff --git a/cdr/common/source/parameters.cc b/cdr/common/source/parameters.cc index b5b7fe1..36f606a 100644 --- a/cdr/common/source/parameters.cc +++ b/cdr/common/source/parameters.cc @@ -62,7 +62,7 @@ namespace CDR parameter_handler.leave_subsection(); } - void Parameters::read_parameter_file(std::string file_name) + void Parameters::read_parameter_file(const std::string &file_name) { ParameterHandler parameter_handler; {