From: Wolfgang Bangerth Date: Sun, 23 Jul 2023 02:36:40 +0000 (-0600) Subject: Prefer std::make_(un)signed_t over std::make_(un)signed::type. X-Git-Tag: relicensing~647^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=744965d5c2cb58f9e89dbb7a8e85085ae02bf6d1;p=dealii.git Prefer std::make_(un)signed_t over std::make_(un)signed::type. --- diff --git a/include/deal.II/lac/full_matrix.templates.h b/include/deal.II/lac/full_matrix.templates.h index 18be843e26..5185720707 100644 --- a/include/deal.II/lac/full_matrix.templates.h +++ b/include/deal.II/lac/full_matrix.templates.h @@ -289,7 +289,7 @@ FullMatrix::backward(Vector & dst, size_type j; size_type nu = (m() < n() ? m() : n()); - for (std::make_signed::type i = nu - 1; i >= 0; --i) + for (std::make_signed_t i = nu - 1; i >= 0; --i) { typename ProductType::type s = src(i); for (j = i + 1; j < nu; ++j) diff --git a/include/deal.II/lac/lapack_full_matrix.h b/include/deal.II/lac/lapack_full_matrix.h index 84f0181b01..d34c3c80a4 100644 --- a/include/deal.II/lac/lapack_full_matrix.h +++ b/include/deal.II/lac/lapack_full_matrix.h @@ -62,7 +62,7 @@ public: /** * Declare type for container size. */ - using size_type = std::make_unsigned::type; + using size_type = std::make_unsigned_t; /** * Constructor. Initialize the matrix as a square matrix with dimension diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index 924b3dbfab..d243b82919 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -927,7 +927,7 @@ GridOut::write_dx(const Triangulation &tria, for (const unsigned int f : GeometryInfo::face_indices()) { out << ' ' - << static_cast::type>( + << static_cast>( cell->face(f)->boundary_id()); } out << '\n'; @@ -2505,9 +2505,8 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const if (svg_flags.label_level_number || svg_flags.label_cell_index) out << ','; - out - << static_cast::type>( - cell->material_id()); + out << static_cast>( + cell->material_id()); } if (svg_flags.label_subdomain_id) @@ -2516,8 +2515,7 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const svg_flags.label_cell_index || svg_flags.label_material_id) out << ','; if (cell->is_active()) - out << static_cast< - std::make_signed::type>( + out << static_cast>( cell->subdomain_id()); else out << 'X'; @@ -2530,9 +2528,8 @@ GridOut::write_svg(const Triangulation<2, 2> &tria, std::ostream &out) const svg_flags.label_material_id || svg_flags.label_subdomain_id) out << ','; - out - << static_cast::type>( - cell->level_subdomain_id()); + out << static_cast>( + cell->level_subdomain_id()); } out << "" << '\n'; @@ -3139,19 +3136,19 @@ namespace patch.vertices[v] = cell->vertex(v); patch.data(0, v) = cell->level(); patch.data(1, v) = - static_cast::type>( + static_cast>( cell->manifold_id()); patch.data(2, v) = - static_cast::type>( + static_cast>( cell->material_id()); if (cell->is_active()) patch.data(3, v) = - static_cast::type>( + static_cast>( cell->subdomain_id()); else patch.data(3, v) = -1; patch.data(4, v) = - static_cast::type>( + static_cast>( cell->level_subdomain_id()); } patches.push_back(patch); @@ -3473,7 +3470,7 @@ GridOut::write_vtk(const Triangulation &tria, { for (const auto &cell : tria.active_cell_iterators()) { - out << static_cast::type>( + out << static_cast>( cell->material_id()) << ' '; } @@ -3483,7 +3480,7 @@ GridOut::write_vtk(const Triangulation &tria, { for (const auto &face : faces) { - out << static_cast::type>( + out << static_cast>( face->boundary_id()) << ' '; } @@ -3493,7 +3490,7 @@ GridOut::write_vtk(const Triangulation &tria, { for (const auto &edge : edges) { - out << static_cast::type>( + out << static_cast>( edge->boundary_id()) << ' '; } @@ -3507,7 +3504,7 @@ GridOut::write_vtk(const Triangulation &tria, { for (const auto &cell : tria.active_cell_iterators()) { - out << static_cast::type>( + out << static_cast>( cell->manifold_id()) << ' '; } @@ -3517,7 +3514,7 @@ GridOut::write_vtk(const Triangulation &tria, { for (const auto &face : faces) { - out << static_cast::type>( + out << static_cast>( face->manifold_id()) << ' '; } @@ -3527,7 +3524,7 @@ GridOut::write_vtk(const Triangulation &tria, { for (const auto &edge : edges) { - out << static_cast::type>( + out << static_cast>( edge->manifold_id()) << ' '; } @@ -3645,12 +3642,12 @@ GridOut::write_mesh_per_processor_as_vtu( patch.data(0, vertex) = cell->level(); if (cell->is_active()) patch.data(1, vertex) = static_cast( - static_cast::type>( + static_cast>( cell->subdomain_id())); else patch.data(1, vertex) = -1.0; patch.data(2, vertex) = static_cast( - static_cast::type>( + static_cast>( cell->level_subdomain_id())); patch.data(3, vertex) = tria.locally_owned_subdomain(); }