From 662bed228d125dfeb7945c292d32da2b71781a22 Mon Sep 17 00:00:00 2001 From: Marco Feder Date: Wed, 5 Jul 2023 19:09:20 +0200 Subject: [PATCH] Use structured binding --- source/grid/grid_tools.cc | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index ece105741a..43185a32f0 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -5968,10 +5968,8 @@ namespace GridTools ArborXWrappers::DistributedTree distributed_tree(comm, global_bboxes[idx]); - auto indices_ranks_offset = distributed_tree.query(bb_intersect); - auto indices_ranks = indices_ranks_offset.first; - auto offsets = indices_ranks_offset.second; - + const auto &[indices_ranks, offsets] = + distributed_tree.query(bb_intersect); fill_ranks_and_indices(offsets, indices_ranks); } else if constexpr (spacedim == 3) @@ -5983,10 +5981,8 @@ namespace GridTools { ArborXWrappers::PointIntersectPredicate bb_intersect(entities); - auto indices_ranks_offset = distributed_tree.query(bb_intersect); - auto indices_ranks = indices_ranks_offset.first; - auto offsets = indices_ranks_offset.second; - + const auto &[indices_ranks, offsets] = + distributed_tree.query(bb_intersect); fill_ranks_and_indices(offsets, indices_ranks); } else if constexpr (std::is_same>::value) @@ -5994,10 +5990,8 @@ namespace GridTools ArborXWrappers::BoundingBoxIntersectPredicate bb_intersect( entities); - auto indices_ranks_offset = distributed_tree.query(bb_intersect); - auto indices_ranks = indices_ranks_offset.first; - auto offsets = indices_ranks_offset.second; - + const auto &[indices_ranks, offsets] = + distributed_tree.query(bb_intersect); fill_ranks_and_indices(offsets, indices_ranks); } } -- 2.39.5