From e45f53451cc25501700585ecbd7779277b52a396 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 22 May 2020 10:13:57 -0500 Subject: [PATCH] make the clang-tidy happy again (new standard, new warnings) --- examples/step-58/step-58.cc | 2 +- include/deal.II/physics/notation.h | 2 +- source/base/tensor_product_polynomials.cc | 4 ++-- source/dofs/dof_handler.cc | 4 +--- 4 files changed, 5 insertions(+), 7 deletions(-) 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; -- 2.39.5