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

[ROS 2][grid_map_core] Code enhancements from master b7293f5 #494

Open
wants to merge 4 commits into
base: rolling
Choose a base branch
from

Conversation

kjalloul-anybotics
Copy link

@kjalloul-anybotics kjalloul-anybotics commented Nov 29, 2024

Cherry-picked commit b7293f5 (No PR)

Includes fixing typos, math.h to cmath, push_back to emplace_back, and other code improvements.

[grid map core] Reduce clang warnings

GitOrigin-RevId: 0b01ff34cd31833b65f4718fab82467f11332938
@Ryanf55
Copy link
Collaborator

Ryanf55 commented Nov 29, 2024

Can you post the clang warnings this solves? Note that the change of the type to a function and the removal of const are ABI breaking, so this can only be merged to rolling

@@ -30,14 +30,14 @@ class CircleIterator
* @param center the position of the circle center.
* @param radius the radius of the circle.
*/
CircleIterator(const GridMap & gridMap, const Position & center, const double radius);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would like know what the motivation is for this change. It goes against const correctness.
https://isocpp.org/wiki/faq/const-correctness

Can you share what compile warning this solves?

Copy link
Author

Choose a reason for hiding this comment

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

Ah to be honest I didn't get these warnings myself. The title is a bit confusing, but this was just part of the effort to make rolling as up to date as possible as master.

Is it not advisable to fix these if we're not seeing them ourselves during colcon build? Then I would just port the major changes from these, but it's a bit confusing to know what was a needed fix and what was just a code clean up.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yea, especially if the change breaks ABI, I don't see any strong reason to fold it in. Perhaps it's worth starting with any bugfixes that have associated tests?

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Nov 29, 2024

One more thing - if this solves all of the clang warnings, it would be fantastic to add a CI job that enforces no new clang warnings. That would be a nice follow up to this.

@kjalloul-anybotics kjalloul-anybotics changed the title [ROS 2][grid_map_core] Reduce clang warnings [ROS 2][grid_map_core] Code enhancements from master Dec 3, 2024
@kjalloul-anybotics kjalloul-anybotics changed the title [ROS 2][grid_map_core] Code enhancements from master [ROS 2][grid_map_core] Code enhancements from master b7293f5 Dec 3, 2024
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