]> https://gitweb.dealii.org/ - dealii.git/commitdiff
make the clang-tidy happy again (new standard, new warnings)
authorMatthias Maier <tamiko@43-1.org>
Fri, 22 May 2020 15:13:57 +0000 (10:13 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sat, 23 May 2020 14:59:23 +0000 (09:59 -0500)
examples/step-58/step-58.cc
include/deal.II/physics/notation.h
source/base/tensor_product_polynomials.cc
source/dofs/dof_handler.cc

index 569b9e9464eba79cd3b4ae7cbeb5c2331df8ce8a..9a2674d8d24aa31e43d8a5bbf7feb63e9769c1b1 100644 (file)
@@ -156,7 +156,7 @@ namespace Step58
         sum += alpha * std::exp(-(r * r) / (R * R));
       }
 
-    return std::complex<double>(std::sqrt(sum), 0.);
+    return {std::sqrt(sum), 0.};
   }
 
 
index 080375d2f46b3d5d96e6146d7aa9bb3a49b9eb20..719191967458e45077b2e78a84f63546d5e04749 100644 (file)
@@ -682,7 +682,7 @@ namespace Physics
         indices_from_component(const unsigned int component_n, const bool)
         {
           AssertThrow(false, ExcNotImplemented());
-          return std::pair<unsigned int, unsigned int>();
+          return std::make_pair(0u, 0u);
         }
 
 
index a4c344b444be68f72cfc440f343124523838d3f4..c086b52ec06e4736e18b60086b26a2f43661e958 100644 (file)
@@ -202,7 +202,7 @@ TensorProductPolynomials<0, Polynomials::Polynomial<double>>::compute_grad(
   const unsigned int,
   const Point<0> &) const
 {
-  return Tensor<1, 0>();
+  return {};
 }
 
 
@@ -258,7 +258,7 @@ TensorProductPolynomials<0, Polynomials::Polynomial<double>>::compute_grad_grad(
   const unsigned int,
   const Point<0> &) const
 {
-  return Tensor<2, 0>();
+  return {};
 }
 
 
index 81324d050518680cfe623928a255a491894f8dbf..5372d6872b5d280f9ee587af82634ced6c7d3173 100644 (file)
@@ -1169,9 +1169,7 @@ DoFHandler<dim, spacedim>::n_boundary_dofs(
               const unsigned int boundary_id = face->boundary_id();
 
               if (face->at_boundary() &&
-                  std::find(boundary_ids.begin(),
-                            boundary_ids.end(),
-                            boundary_id) != boundary_ids.end())
+                  boundary_ids.find(boundary_id) != boundary_ids.end())
                 {
                   cell->face(iface)->get_dof_indices(dofs_on_face);
                   for (unsigned int idof_face = 0; idof_face < dofs_per_face;

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.