From 013bc7ad0f43eeb270dd483f93cff2e66d2e0a43 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 18 Jul 2018 01:07:01 +0200 Subject: [PATCH] Address clang-tidy suggestions --- include/deal.II/numerics/data_out_dof_data.templates.h | 4 ++-- source/grid/grid_generator.cc | 8 ++++---- tests/quick_tests/sundials-ida.cc | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/deal.II/numerics/data_out_dof_data.templates.h b/include/deal.II/numerics/data_out_dof_data.templates.h index b32440a613..8f492389d7 100644 --- a/include/deal.II/numerics/data_out_dof_data.templates.h +++ b/include/deal.II/numerics/data_out_dof_data.templates.h @@ -1389,7 +1389,7 @@ DataOut_DoFData:: } // finally add a corresponding range - ranges.push_back(std::make_tuple( + ranges.emplace_back(std::forward_as_tuple( output_component, output_component + patch_space_dim - 1, name, @@ -1428,7 +1428,7 @@ DataOut_DoFData:: } // finally add a corresponding range - ranges.push_back(std::make_tuple( + ranges.emplace_back(std::forward_as_tuple( output_component, output_component + size - 1, name, diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index 2ed25d76b7..4181dc1a7e 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -1983,7 +1983,7 @@ namespace GridGenerator auto min_line_length = [](const Triangulation<2> &tria) -> double { double length = std::numeric_limits::max(); - for (const auto cell : tria.active_cell_iterators()) + for (const auto &cell : tria.active_cell_iterators()) for (unsigned int n = 0; n < GeometryInfo<2>::lines_per_cell; ++n) length = std::min(length, cell->line(n)->diameter()); return length; @@ -4214,7 +4214,7 @@ namespace GridGenerator line->vertex_index(1) + offset; boundary_line.manifold_id = line->manifold_id(); subcell_data.boundary_lines.push_back( - std::move(boundary_line)); + boundary_line); // trivially-copyable } }; @@ -4257,7 +4257,7 @@ namespace GridGenerator boundary_quad.manifold_id = face->manifold_id(); subcell_data.boundary_quads.push_back( - std::move(boundary_quad)); + boundary_quad); // trivially-copyable } for (const auto &cell : tria.cell_iterators()) for (unsigned int l = 0; l < 12; ++l) @@ -4272,7 +4272,7 @@ namespace GridGenerator boundary_line.manifold_id = cell->line(l)->manifold_id(); subcell_data.boundary_lines.push_back( - std::move(boundary_line)); + boundary_line); // trivially_copyable } }; diff --git a/tests/quick_tests/sundials-ida.cc b/tests/quick_tests/sundials-ida.cc index 38d9878a3d..2148c78ed7 100644 --- a/tests/quick_tests/sundials-ida.cc +++ b/tests/quick_tests/sundials-ida.cc @@ -72,7 +72,7 @@ public: time_stepper.reinit_vector = [&](Vector &v) { v.reinit(2); }; - typedef Vector VectorType; + using VectorType = Vector; time_stepper.residual = [&](const double /*t*/, const VectorType &y, -- 2.39.5