From 6eba933b63f22546cab1b9d98da4b28843c4981d Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 8 Jul 2023 00:21:13 -0600 Subject: [PATCH] Replace use of C-style array by std::array. --- .../vector_tools_constraints.templates.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/include/deal.II/numerics/vector_tools_constraints.templates.h b/include/deal.II/numerics/vector_tools_constraints.templates.h index 235392d05d..3fa96e5a78 100644 --- a/include/deal.II/numerics/vector_tools_constraints.templates.h +++ b/include/deal.II/numerics/vector_tools_constraints.templates.h @@ -38,7 +38,7 @@ namespace VectorTools template struct VectorDoFTuple { - types::global_dof_index dof_indices[dim]; + std::array dof_indices; VectorDoFTuple() { @@ -50,28 +50,19 @@ namespace VectorTools bool operator<(const VectorDoFTuple &other) const { - for (unsigned int i = 0; i < dim; ++i) - if (dof_indices[i] < other.dof_indices[i]) - return true; - else if (dof_indices[i] > other.dof_indices[i]) - return false; - return false; + return (dof_indices < other.dof_indices); } bool operator==(const VectorDoFTuple &other) const { - for (unsigned int i = 0; i < dim; ++i) - if (dof_indices[i] != other.dof_indices[i]) - return false; - - return true; + return (dof_indices == other.dof_indices); } bool operator!=(const VectorDoFTuple &other) const { - return !(*this == other); + return (dof_indices != other.dof_indices); } }; -- 2.39.5