-
Notifications
You must be signed in to change notification settings - Fork 95
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 std::string::empty instead comparing with an empty string #69
Conversation
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.
thanks @dawagner for the fix. I have one tiny comment otherwise looks good to me
@@ -46,7 +46,7 @@ | |||
typedef Base _base; \ | |||
ProxyExec ## UniqueID() \ | |||
{ \ | |||
if (std::string(Message) != "") { \ | |||
if (not std::string(Message).empty()) { \ |
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.
Nitpick: As the entire library uses !
for the negation operator and not the alternative operator not
, I'd prefer to use !
here
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.
Ok, done.
Caught by clang-tidy.
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, thanks!
This is essentially a port of PR #69 to ROS 2 so that clang-tidy will stop complaining about it. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This is essentially a port of PR #69 to ROS 2 so that clang-tidy will stop complaining about it. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This is essentially a port of PR #69 to ROS 2 so that clang-tidy will stop complaining about it. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This is essentially a port of PR #69 to ROS 2 so that clang-tidy will stop complaining about it. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This is essentially a port of PR #69 to ROS 2 so that clang-tidy will stop complaining about it. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This is essentially a port of PR #69 to ROS 2 so that clang-tidy will stop complaining about it. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This is essentially a port of PR #69 to ROS 2 so that clang-tidy will stop complaining about it. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
This is essentially a port of PR #69 to ROS 2 so that clang-tidy will stop complaining about it. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Caught by clang-tidy.