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

Add default constructor to NodeInterfaces #2094

Merged
merged 2 commits into from
Jan 30, 2023

Conversation

sloretz
Copy link
Contributor

@sloretz sloretz commented Jan 28, 2023

This adds a default constructor. This allows a class to have an interfaces member that get's populated by an argument to it's constructor.

Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
@@ -44,6 +44,10 @@ struct NodeInterfacesStorage
: interfaces_(init_tuple<decltype(node), InterfaceTs ...>(node))
{}

NodeInterfacesStorage() // NOLINT(runtime/explicit)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this NOLINT directive is not necesary. cpplint only enforces the usage of explicit for constructors with a single argument.

I tested it locally and the linters were happy with the NOLINT comment removed!

Suggested change
NodeInterfacesStorage() // NOLINT(runtime/explicit)
NodeInterfacesStorage()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in e654446

@methylDragon
Copy link
Contributor

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

Signed-off-by: Shane Loretz <sloretz@google.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.

lgtm with @methylDragon comment resolved.

@sloretz
Copy link
Contributor Author

sloretz commented Jan 30, 2023

Since changes since full CI just remove a comment, I think only linter tests are needed. I'll merge if the Rpr job comes back green.

@sloretz sloretz merged commit 97c5c11 into rolling Jan 30, 2023
@delete-merged-branch delete-merged-branch bot deleted the sloretz__node_interfaces_default_constructor branch January 30, 2023 21:47
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

4 participants