]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix some more clang-tidy findings 15641/head
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 4 Jul 2023 02:55:50 +0000 (22:55 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Tue, 4 Jul 2023 02:56:24 +0000 (22:56 -0400)
examples/step-17/step-17.cc
examples/step-70/step-70.cc

index 6089836ea699a5092c9b67a7ad3ee8a413526135..eaeb105bb63056ef851975d682caa241b5df62af 100644 (file)
@@ -361,7 +361,7 @@ namespace Step17
     // matrix-vector multiplications:
     const std::vector<IndexSet> locally_owned_dofs_per_proc =
       DoFTools::locally_owned_dofs_per_subdomain(dof_handler);
-    const IndexSet locally_owned_dofs =
+    const IndexSet &locally_owned_dofs =
       locally_owned_dofs_per_proc[this_mpi_process];
 
     system_matrix.reinit(locally_owned_dofs,
index 011964a3e1f14989bad6b9a13638ad21f9657d14..4b94baf3d5165fc7c5171cba458202c2b493c008 100644 (file)
@@ -1749,7 +1749,7 @@ namespace Step70
     static std::map<std::string, std::vector<std::pair<double, std::string>>>
       times_and_names;
     if (times_and_names.find(fprefix) != times_and_names.end())
-      times_and_names[fprefix].push_back(std::make_pair(time, filename));
+      times_and_names[fprefix].emplace_back(time, filename);
     else
       times_and_names[fprefix] = {std::make_pair(time, filename)};
     std::ofstream ofile(par.output_directory + "/" + fprefix + ".pvd");

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.