Skip to content

Commit

Permalink
Use referenes to return centroids for Point and Sphere
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop committed Oct 10, 2024
1 parent 0975b50 commit f86393b
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 f86393b

Please sign in to comment.