Skip to content

Commit

Permalink
Passed node parameter in const & type. See ( #18 (comment) )
Browse files Browse the repository at this point in the history
  • Loading branch information
CihatAltiparmak committed Aug 3, 2024
1 parent 5fdfeaa commit f46f58d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ScenarioBasicServiceClient
/** \brief Constructor
* \param [in] node The ros node for sending request and wait response from server
*/
ScenarioBasicServiceClient(rclcpp::Node::SharedPtr node);
ScenarioBasicServiceClient(const rclcpp::Node::SharedPtr& node);

/** \brief the method to send the requests \e sending_request_number times
* \param [in] sending_request_number the number for how many request is sent by client
Expand Down
2 changes: 1 addition & 1 deletion src/scenarios/scenario_basic_service_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace middleware_benchmark

using namespace std::chrono_literals;

ScenarioBasicServiceClient::ScenarioBasicServiceClient(rclcpp::Node::SharedPtr node) : node_(node)
ScenarioBasicServiceClient::ScenarioBasicServiceClient(const rclcpp::Node::SharedPtr& node) : node_(node)
{
client_ = node_->create_client<example_interfaces::srv::AddTwoInts>("add_two_ints");

Expand Down

0 comments on commit f46f58d

Please sign in to comment.