Skip to content

Commit

Permalink
Merge pull request #1178 from aprokop/fix_couple_centroid
Browse files Browse the repository at this point in the history
Fiddle with return type deduction for Point and Sphere centroid algorithm to prefer references
  • Loading branch information
aprokop authored Oct 10, 2024
2 parents d1792b8 + f86393b commit 4243afc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/geometry/algorithms/ArborX_Centroid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ using namespace GeometryTraits;
template <typename Point>
struct centroid<PointTag, Point>
{
KOKKOS_FUNCTION static constexpr auto apply(Point const &point)
KOKKOS_FUNCTION static constexpr auto &apply(Point const &point)
{
return point;
}
Expand All @@ -62,7 +62,7 @@ struct centroid<BoxTag, Box>
template <typename Sphere>
struct centroid<SphereTag, Sphere>
{
KOKKOS_FUNCTION static constexpr auto apply(Sphere const &sphere)
KOKKOS_FUNCTION static constexpr decltype(auto) apply(Sphere const &sphere)
{
return sphere.centroid();
}
Expand Down

0 comments on commit 4243afc

Please sign in to comment.