From e490136b069f8c0e995bf7428c3447d50c5eb26c Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Sat, 1 Aug 2020 16:37:04 -0400 Subject: [PATCH] apply suggestion --- include/deal.II/dofs/dof_accessor.templates.h | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index 8229ac7fd7..c7c9cc567f 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -281,29 +281,26 @@ namespace internal AssertIndexRange(obj_level, dof_handler.object_dof_indices.size()); AssertIndexRange(d, dof_handler.object_dof_indices[obj_level].size()); - unsigned int fe_index_; Assert(dof_handler.hp_capability_enabled, ExcInternalError()); - { - AssertIndexRange(d, dof_handler.hp_object_fe_ptr.size()); - AssertIndexRange(obj_index, dof_handler.hp_object_fe_ptr[d].size()); + AssertIndexRange(d, dof_handler.hp_object_fe_ptr.size()); + AssertIndexRange(obj_index, dof_handler.hp_object_fe_ptr[d].size()); - const auto ptr = - std::find(dof_handler.hp_object_fe_indices[d].begin() + - dof_handler.hp_object_fe_ptr[d][obj_index], - dof_handler.hp_object_fe_indices[d].begin() + - dof_handler.hp_object_fe_ptr[d][obj_index + 1], - fe_index); + const auto ptr = + std::find(dof_handler.hp_object_fe_indices[d].begin() + + dof_handler.hp_object_fe_ptr[d][obj_index], + dof_handler.hp_object_fe_indices[d].begin() + + dof_handler.hp_object_fe_ptr[d][obj_index + 1], + fe_index); - Assert(ptr != dof_handler.hp_object_fe_indices[d].begin() + - dof_handler.hp_object_fe_ptr[d][obj_index + 1], - ExcNotImplemented()); + Assert(ptr != dof_handler.hp_object_fe_indices[d].begin() + + dof_handler.hp_object_fe_ptr[d][obj_index + 1], + ExcNotImplemented()); - fe_index_ = - std::distance(dof_handler.hp_object_fe_indices[d].begin() + - dof_handler.hp_object_fe_ptr[d][obj_index], - ptr); - } + const unsigned int fe_index_ = + std::distance(dof_handler.hp_object_fe_indices[d].begin() + + dof_handler.hp_object_fe_ptr[d][obj_index], + ptr); AssertIndexRange(dof_handler.hp_capability_enabled ? (dof_handler.hp_object_fe_ptr[d][obj_index] + -- 2.39.5