Skip to content

Commit

Permalink
Use .empty() to check for an empty string. (#132)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
clalancette committed Jan 8, 2020
1 parent 26f2423 commit 11568e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/class_loader/register_macro.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
typedef Base _base; \
ProxyExec ## UniqueID() \
{ \
if (std::string(Message) != "") { \
if (!std::string(Message).empty()) { \
CONSOLE_BRIDGE_logInform("%s", Message); \
} \
class_loader::impl::registerPlugin<_derived, _base>(#Derived, #Base); \
Expand Down

0 comments on commit 11568e8

Please sign in to comment.