Skip to content

Commit

Permalink
Increase clarity of prefix_ by renaming it to analyzers_ns_
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCornelis2 committed Jan 12, 2024
1 parent 8bea594 commit 817e6f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diagnostic_aggregator/src/add_analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class AddAnalyzer : public rclcpp::Node
std::map<std::string, rclcpp::Parameter> parameters;
if (this->get_parameters("", parameters)) {
for (const auto & param : parameters) {
if (param.first.substr(0, prefix_.length()).compare(prefix_) == 0) {
if (param.first.substr(0, analyzers_ns_.length()).compare(analyzers_ns_) == 0) {
auto parameter_msg = param.second.to_parameter_msg();
request->parameters.push_back(parameter_msg);
}
Expand All @@ -85,7 +85,7 @@ class AddAnalyzer : public rclcpp::Node

private:
rclcpp::Client<rcl_interfaces::srv::SetParametersAtomically>::SharedPtr client_;
std::string prefix_ = "analyzers.";
std::string analyzers_ns_ = "analyzers.";
};

int main(int argc, char ** argv)
Expand Down

0 comments on commit 817e6f6

Please sign in to comment.