Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ static const std::string ROBOT_DESCRIPTION = "robot_description";

static const std::string CONSTRAINT_PARAMETER = "constraints";

static bool getUintParameterOr(const rclcpp::Node::SharedPtr& node, const std::string& param_name,
size_t&& result_value, const size_t default_value)
static bool get_uint_parameter_or(const rclcpp::Node::SharedPtr& node, const std::string& param_name,
unsigned int& result_value, const size_t default_value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should consistently use size_t or unsigned int:

Suggested change
unsigned int& result_value, const size_t default_value)
unsigned int& result_value, const unsigned int default_value)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! You’re right—I’ll unify all related types in the function signature to unsigned int, including the default value type. I’ll verify everything locally tomorrow and then immediately update the branch and push a new PR. Thank you again for your guidance, and I look forward to any further feedback!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! I’ve unified the types to unsigned int (including the default value) and pushed the update. Please take another look.

{
int param_value;
if (node->get_parameter(param_name, param_value))
Expand All @@ -76,6 +76,7 @@ static bool getUintParameterOr(const rclcpp::Node::SharedPtr& node, const std::s
return true;
}


struct GenerateStateDatabaseParameters
{
bool setFromNode(const rclcpp::Node::SharedPtr& node)
Expand Down