Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fiddle with return type deduction for Point and Sphere centroid algorithm to prefer references #1178

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

aprokop
Copy link
Contributor

@aprokop aprokop commented Oct 10, 2024

No description provided.

@aprokop aprokop force-pushed the fix_couple_centroid branch from 49ca814 to f86393b Compare October 10, 2024 15:38
@dalg24 dalg24 changed the title Use referenes to return centroids for Point and Sphere Fiddle with return type deduction for Point and Sphere centroid algorithm to prefer references Oct 10, 2024
@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
KOKKOS_FUNCTION static constexpr auto &apply(Point const &point)
KOKKOS_FUNCTION static constexpr Point &apply(Point const &point)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping

Copy link
Contributor Author

@aprokop aprokop Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not see how it made any difference. Minor clarity, perhaps.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then say so, don't just ignore suggestions.
Otherwise I will quit approving ahead of time

@aprokop aprokop merged commit 4243afc into arborx:master Oct 10, 2024
2 checks passed
@aprokop aprokop deleted the fix_couple_centroid branch October 10, 2024 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants