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 emplace() with std::maps #231

Merged
merged 1 commit into from
Dec 9, 2024
Merged

Use emplace() with std::maps #231

merged 1 commit into from
Dec 9, 2024

Conversation

roncapat
Copy link
Contributor

@roncapat roncapat commented Dec 4, 2024

This is simpler IMHO at code level, more explicit than relying on move semantics to elide the copy of the temporary elements.

Reference:
https://en.cppreference.com/w/cpp/container/map/emplace

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

The code change makes sense to me. Can you please Sign-off your commit? Once that is done I'll run CI on it.

Signed-off-by: Patrick Roncagliolo <[email protected]>
@clalancette
Copy link
Contributor

Pulls: #231
Gist: https://gist.githubusercontent.com/clalancette/c707774d89bafb64c8ae2de582b7112c/raw/b57ffc1c315be143cff475b3883db12fa7d470b5/ros2.repos
BUILD args: --packages-above-and-dependencies robot_state_publisher
TEST args: --packages-above robot_state_publisher
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14924

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@clalancette clalancette merged commit 9558725 into ros:rolling Dec 9, 2024
3 checks passed
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