From f86393b0fa9601a89e499b32761770b64e43573e Mon Sep 17 00:00:00 2001 From: Andrey Prokopenko Date: Thu, 10 Oct 2024 11:35:12 -0400 Subject: [PATCH] Use referenes to return centroids for Point and Sphere --- src/geometry/algorithms/ArborX_Centroid.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/geometry/algorithms/ArborX_Centroid.hpp b/src/geometry/algorithms/ArborX_Centroid.hpp index 3daa73211..6279c4521 100644 --- a/src/geometry/algorithms/ArborX_Centroid.hpp +++ b/src/geometry/algorithms/ArborX_Centroid.hpp @@ -40,7 +40,7 @@ using namespace GeometryTraits; template struct centroid { - KOKKOS_FUNCTION static constexpr auto apply(Point const &point) + KOKKOS_FUNCTION static constexpr auto &apply(Point const &point) { return point; } @@ -62,7 +62,7 @@ struct centroid template struct centroid { - KOKKOS_FUNCTION static constexpr auto apply(Sphere const &sphere) + KOKKOS_FUNCTION static constexpr decltype(auto) apply(Sphere const &sphere) { return sphere.centroid(); }