From: Matthias Maier Date: Fri, 22 May 2020 15:13:57 +0000 (-0500) Subject: make the clang-tidy happy again (new standard, new warnings) X-Git-Tag: v9.3.0-rc1~1575^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e45f53451cc25501700585ecbd7779277b52a396;p=dealii.git make the clang-tidy happy again (new standard, new warnings) --- diff --git a/examples/step-58/step-58.cc b/examples/step-58/step-58.cc index 569b9e9464..9a2674d8d2 100644 --- a/examples/step-58/step-58.cc +++ b/examples/step-58/step-58.cc @@ -156,7 +156,7 @@ namespace Step58 sum += alpha * std::exp(-(r * r) / (R * R)); } - return std::complex(std::sqrt(sum), 0.); + return {std::sqrt(sum), 0.}; } diff --git a/include/deal.II/physics/notation.h b/include/deal.II/physics/notation.h index 080375d2f4..7191919674 100644 --- a/include/deal.II/physics/notation.h +++ b/include/deal.II/physics/notation.h @@ -682,7 +682,7 @@ namespace Physics indices_from_component(const unsigned int component_n, const bool) { AssertThrow(false, ExcNotImplemented()); - return std::pair(); + return std::make_pair(0u, 0u); } diff --git a/source/base/tensor_product_polynomials.cc b/source/base/tensor_product_polynomials.cc index a4c344b444..c086b52ec0 100644 --- a/source/base/tensor_product_polynomials.cc +++ b/source/base/tensor_product_polynomials.cc @@ -202,7 +202,7 @@ TensorProductPolynomials<0, Polynomials::Polynomial>::compute_grad( const unsigned int, const Point<0> &) const { - return Tensor<1, 0>(); + return {}; } @@ -258,7 +258,7 @@ TensorProductPolynomials<0, Polynomials::Polynomial>::compute_grad_grad( const unsigned int, const Point<0> &) const { - return Tensor<2, 0>(); + return {}; } diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index 81324d0505..5372d6872b 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -1169,9 +1169,7 @@ DoFHandler::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;