Skip to content

Commit

Permalink
Refactor yet another method and fix include
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Bordallo committed May 10, 2023
1 parent e0a439a commit ae12b90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hardware_interface/src/component_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ std::string parse_data_type_attribute(const tinyxml2::XMLElement * elem)
bool parse_is_async_attribute(const tinyxml2::XMLElement * elem)
{
const tinyxml2::XMLAttribute * attr = elem->FindAttribute(kIsAsyncAttribute);
return attr ? strcasecmp(attr->Value(), "true") == 0 : false;
return parse_bool(attr->Value());
}

/// Search XML snippet from URDF for parameters.
Expand Down
4 changes: 2 additions & 2 deletions hardware_interface/src/mock_components/generic_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <string>
#include <vector>

#include "hardware_interface/component_parser.h"
#include "hardware_interface/component_parser.hpp"
#include "hardware_interface/types/hardware_interface_type_values.hpp"
#include "rcutils/logging_macros.h"

Expand Down Expand Up @@ -99,7 +99,7 @@ CallbackReturn GenericSystem::on_init(const hardware_interface::HardwareInfo & i
it = info_.hardware_parameters.find("fake_gpio_commands");
if (it != info_.hardware_parameters.end())
{
use_fake_gpio_command_interfaces = hardware_interface::parse_bool(it->second);
use_fake_gpio_command_interfaces_ = hardware_interface::parse_bool(it->second);
}
else
{
Expand Down

0 comments on commit ae12b90

Please sign in to comment.