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

Simplify local_namespace handling in rcl_node_init. #1097

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

clalancette
Copy link
Contributor

There is a comment in there about avoiding a memory allocation, but that doesn't seem to make much sense to me; we are going to be doing an allocation directly below, so avoiding it here seems unnecessary and makes the code harder to follow. Simplify everything by always making an allocation

There is a comment in there about avoiding a memory allocation,
but that doesn't seem to make much sense to me; we are
going to be doing an allocation directly below, so avoiding
it here seems unnecessary and makes the code harder
to follow.  Simplify everything by always making an allocation

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

makes sense to me.

i think it allocated the memory for "/" anyway (if we really want to avoid memory allocation, i would store it in the code area)... instead of this, we can go straight-forward to keep it simple. besides, this is one of the configuration APIs.

@clalancette
Copy link
Contributor Author

CI:

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

@clalancette clalancette merged commit 06d5745 into rolling Aug 28, 2023
3 checks passed
@clalancette clalancette deleted the clalancette/simplify-namespace-handling branch August 28, 2023 13:17
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.

None yet

2 participants