From: David Wells Date: Sun, 14 Aug 2016 22:59:01 +0000 (-0400) Subject: Prefer const reference to const value. X-Git-Tag: v8.5.0-rc1~770^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=336966a23b2cfc7780390581b9fc745cddfec948;p=dealii.git Prefer const reference to const value. These were caught by cppcheck. --- diff --git a/include/deal.II/integrators/l2.h b/include/deal.II/integrators/l2.h index 8d6a90efbb..4daf2789ef 100644 --- a/include/deal.II/integrators/l2.h +++ b/include/deal.II/integrators/l2.h @@ -105,7 +105,7 @@ namespace LocalIntegrators void weighted_mass_matrix ( FullMatrix &M, const FEValuesBase &fe, - const std::vector weights) + const std::vector &weights) { const unsigned int n_dofs = fe.dofs_per_cell; const unsigned int n_components = fe.get_fe().n_components(); diff --git a/include/deal.II/numerics/point_value_history.h b/include/deal.II/numerics/point_value_history.h index 32f1aa701c..512e957ecb 100644 --- a/include/deal.II/numerics/point_value_history.h +++ b/include/deal.II/numerics/point_value_history.h @@ -409,7 +409,7 @@ public: * locations output. */ void write_gnuplot (const std::string &base_name, - const std::vector > postprocessor_locations = std::vector > ()); + const std::vector > &postprocessor_locations = std::vector > ()); /** diff --git a/source/numerics/point_value_history.cc b/source/numerics/point_value_history.cc index 21109d40ea..00eb48b220 100644 --- a/source/numerics/point_value_history.cc +++ b/source/numerics/point_value_history.cc @@ -899,7 +899,8 @@ void PointValueHistory template void PointValueHistory -::write_gnuplot (const std::string &base_name, const std::vector > postprocessor_locations) +::write_gnuplot (const std::string &base_name, + const std::vector > &postprocessor_locations) { AssertThrow (closed, ExcInvalidState ()); AssertThrow (!cleared, ExcInvalidState ());