From 714732d9416124cb9a33f4e5ebc375be114c1abc Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 27 Jan 2018 13:25:16 -0500 Subject: [PATCH] Use constant references instead of copies. This was found by cppcheck. --- include/deal.II/base/timer.h | 2 +- include/deal.II/numerics/data_out_dof_data.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/deal.II/base/timer.h b/include/deal.II/base/timer.h index 6ba90bf7fe..75d64f2cbf 100644 --- a/include/deal.II/base/timer.h +++ b/include/deal.II/base/timer.h @@ -945,7 +945,7 @@ inline void Timer::print_last_lap_wall_time_data(StreamType &stream) const { - const Utilities::MPI::MinMaxAvg statistic = get_last_lap_wall_time_data(); + const Utilities::MPI::MinMaxAvg &statistic = get_last_lap_wall_time_data(); stream << statistic.max << " wall," << " max @" << statistic.max_index << ", min=" << statistic.min << " @" << statistic.min_index << ", avg=" << statistic.avg << std::endl; diff --git a/include/deal.II/numerics/data_out_dof_data.h b/include/deal.II/numerics/data_out_dof_data.h index 6b05d428ac..6dff5d8004 100644 --- a/include/deal.II/numerics/data_out_dof_data.h +++ b/include/deal.II/numerics/data_out_dof_data.h @@ -1016,7 +1016,7 @@ DataOut_DoFData:: merge_patches (const DataOut_DoFData &source, const Point &shift) { - const std::vector source_patches = source.get_patches (); + const std::vector &source_patches = source.get_patches (); Assert ((patches.size () != 0) && (source_patches.size () != 0), ExcMessage ("When calling this function, both the current " -- 2.39.5