Skip to content

Commit

Permalink
Use RCLCPP_WARN_EXPRESSION
Browse files Browse the repository at this point in the history
Co-authored-by: Sai Kishor Kothakota <[email protected]>
  • Loading branch information
christophfroehlich and saikishor authored Nov 25, 2024
1 parent 66a6ffe commit 1125e2e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions hardware_interface/src/resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,13 +611,10 @@ class ResourceStorage
auto interfaces = hardware.export_state_interfaces();
const auto interface_names = add_state_interfaces(interfaces);

if (interface_names.empty())
{
RCLCPP_WARN(
get_logger(),
"Importing state interfaces for the hardware '%s' returned no state interfaces.",
hardware.get_name().c_str());
}
RCLCPP_WARN_EXPRESSION(
get_logger(), interface_names.empty(),
"Importing state interfaces for the hardware '%s' returned no state interfaces.",
hardware.get_name().c_str());
hardware_info_map_[hardware.get_name()].state_interfaces = interface_names;
available_state_interfaces_.reserve(
available_state_interfaces_.capacity() + interface_names.size());
Expand Down

0 comments on commit 1125e2e

Please sign in to comment.