Skip to content

Commit

Permalink
more descriptive variable name in getParam
Browse files Browse the repository at this point in the history
  • Loading branch information
john-maidbot committed May 13, 2024
1 parent b9dd026 commit 465bd9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ class SimplePublisherPlugin : public point_cloud_transport::PublisherPlugin

//! template function for getting parameter of a given type
template<typename T>
bool getParam(const std::string & name, T & value) const
bool getParam(const std::string & parameter_name, T & value) const
{
if (simple_impl_) {
uint ns_len = simple_impl_->node_->get_effective_namespace().length();
std::string param_base_name = getTopic().substr(ns_len);
std::replace(param_base_name.begin(), param_base_name.end(), '/', '.');

std::string param_name = param_base_name + "." + name;
std::string param_name = param_base_name + "." + parameter_name;

return simple_impl_->node_->get_parameter(param_name, value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ class SimpleSubscriberPlugin : public SubscriberPlugin

//! template function for getting parameter of a given type
template<typename T>
bool getParam(const std::string & name, T & value) const
bool getParam(const std::string & parameter_name, T & value) const
{
if (impl_) {
uint ns_len = impl_->node_->get_effective_namespace().length();
std::string param_base_name = getTopic().substr(ns_len);
std::replace(param_base_name.begin(), param_base_name.end(), '/', '.');

std::string param_name = param_base_name + "." + name;
std::string param_name = param_base_name + "." + parameter_name;

return impl_->node_->get_parameter(param_name, value);
}
Expand Down

0 comments on commit 465bd9f

Please sign in to comment.