Skip to content

Add default constructor to NodeInterfaces#2094

Merged
sloretz merged 2 commits intorollingfrom
sloretz__node_interfaces_default_constructor
Jan 30, 2023
Merged

Add default constructor to NodeInterfaces#2094
sloretz merged 2 commits intorollingfrom
sloretz__node_interfaces_default_constructor

Conversation

@sloretz
Copy link
Copy Markdown
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>
: interfaces_(init_tuple<decltype(node), InterfaceTs ...>(node))
{}

NodeInterfacesStorage() // NOLINT(runtime/explicit)
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

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

4 participants