From: Wolfgang Bangerth Date: Sat, 8 Jul 2023 06:21:13 +0000 (-0600) Subject: Replace use of C-style array by std::array. X-Git-Tag: relicensing~720^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6eba933b63f22546cab1b9d98da4b28843c4981d;p=dealii.git Replace use of C-style array by std::array. --- 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); } };