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 Dec 19, 2019
1 parent 5735f74 commit 360341f
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 360341f

Please sign in to comment.