]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Use a constant reference for a string.
authorDavid Wells <wellsd2@rpi.edu>
Sat, 9 Jan 2016 20:04:16 +0000 (15:04 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Sat, 9 Jan 2016 21:46:35 +0000 (16:46 -0500)
cdr/common/include/deal.II-cdr/parameters.h
cdr/common/source/parameters.cc

index ddf2d15323c9b0d9911087d74eb9c863a818d534..83e21bf00e90380b4c9e81f82cd0cab75720c8a1 100644 (file)
@@ -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 &parameter_handler);
   };
index b5b7fe12a6295390ceb981c35ccfc8c615150e5d..36f606afc0643e90b5e4831fd34d2c203a638d8d 100644 (file)
@@ -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;
     {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.