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

Use std::array over raw array for transforms #48

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

Ryanf55
Copy link
Collaborator

@Ryanf55 Ryanf55 commented Jan 17, 2024

Purpose

std::array has more compile time safety and carries the length with the object over a raw array.

Risk

None

Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

Reminder to self: We would probably want to backport this to ROS1

@Jaeyoung-Lim Jaeyoung-Lim merged commit ea71232 into ethz-asl:ros2 Jan 17, 2024
2 checks passed
@Ryanf55
Copy link
Collaborator Author

Ryanf55 commented Jan 17, 2024

Awesome, thanks!

Reminder to self: We would probably want to backport this to ROS1

Since std::array was added in C++11, I would go as far to say the GDAL C++ API for transforms should have an overload. I can submit a patch to see if they take it. The advantages of compile time length aren't truly found till it's used though the whole calling function.

@Ryanf55 Ryanf55 deleted the use-std-array-for-transforms branch January 17, 2024 14: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