Skip to content

Commit

Permalink
Merge pull request #5205 from bangerth/array
Browse files Browse the repository at this point in the history
Replace use of C-style array by std::array.
  • Loading branch information
tjhei committed Jul 8, 2023
2 parents 056b05b + 75f00cc commit 67de9f6
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions include/aspect/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace dealii
template <int dim>
struct VectorDoFTuple
{
types::global_dof_index dof_indices[dim];
std::array<types::global_dof_index,dim> dof_indices;

VectorDoFTuple()
{
Expand All @@ -64,28 +64,19 @@ namespace dealii
bool
operator<(const VectorDoFTuple<dim> &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<dim> &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<dim> &other) const
{
return !(*this == other);
return (dof_indices != other.dof_indices);
}
};

Expand Down

0 comments on commit 67de9f6

Please sign in to comment.