-
Notifications
You must be signed in to change notification settings - Fork 228
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
Fix cpplint errors #221
Fix cpplint errors #221
Conversation
@@ -148,7 +151,7 @@ std::string PublicationServer::getService() const | |||
|
|||
PublicationServer::operator void*() const | |||
{ | |||
return (impl_ && impl_->isValid()) ? (void*)1 : (void*)0; | |||
return (impl_ && impl_->isValid()) ? reinterpret_cast<void*>(1) : reinterpret_cast<void*>(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orthogonal to resolving the linter complaint, does anyone have an idea as to why we would want to return a bogus pointer here in case the implementation is valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks like a recipe for segfaults, to me. It must be being treated as an error code of some kind, I guess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this package hasn't been ported to ROS 2, I've dropped changes to it in this PR.
I realized I applied linter fixes to files in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If it's not ported to ROS 2 and is not being built, then I think it's OK to skip the ROS 2 lint fixes. |
Relates to ament/ament_lint#324 Signed-off-by: Jacob Perron <jacob@openrobotics.org>
da4de90
to
121f6ed
Compare
I've dropped all changes to the |
Relates to ament/ament_lint#324