]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Prefer const reference to const value. 2964/head
authorDavid Wells <wellsd2@rpi.edu>
Sun, 14 Aug 2016 22:59:01 +0000 (18:59 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Sun, 14 Aug 2016 23:12:09 +0000 (19:12 -0400)
These were caught by cppcheck.

include/deal.II/integrators/l2.h
include/deal.II/numerics/point_value_history.h
source/numerics/point_value_history.cc

index 8d6a90efbb608bd226c76ff3dec6231ce763c23a..4daf2789efba57f7a290a3e26d041875bedfc1c3 100644 (file)
@@ -105,7 +105,7 @@ namespace LocalIntegrators
     void weighted_mass_matrix (
       FullMatrix<double> &M,
       const FEValuesBase<dim> &fe,
-      const std::vector<double> weights)
+      const std::vector<double> &weights)
     {
       const unsigned int n_dofs = fe.dofs_per_cell;
       const unsigned int n_components = fe.get_fe().n_components();
index 32f1aa701c72aca7d7a959c650caae57369fbc8b..512e957ecb9bf33329be14ca2e97a007d84df17f 100644 (file)
@@ -409,7 +409,7 @@ public:
    * locations output.
    */
   void write_gnuplot (const std::string &base_name,
-                      const std::vector <Point <dim> > postprocessor_locations = std::vector <Point <dim> > ());
+                      const std::vector <Point <dim> > &postprocessor_locations = std::vector <Point <dim> > ());
 
 
   /**
index 21109d40ea05e2e9c523142faa9fb1be21d7973a..00eb48b2201612555ddcbea035ca826fcc1b29f0 100644 (file)
@@ -899,7 +899,8 @@ void PointValueHistory<dim>
 
 template <int dim>
 void PointValueHistory<dim>
-::write_gnuplot (const std::string &base_name, const std::vector <Point <dim> > postprocessor_locations)
+::write_gnuplot (const std::string &base_name,
+                 const std::vector <Point <dim> > &postprocessor_locations)
 {
   AssertThrow (closed, ExcInvalidState ());
   AssertThrow (!cleared, ExcInvalidState ());

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.