File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -93,13 +93,14 @@ PipelinePlanner::PipelinePlanner(
9393
9494bool PipelinePlanner::setPlannerId (const std::string& pipeline_name, const std::string& planner_id) {
9595 // Only set ID if pipeline exists. It is not possible to create new pipelines with this command.
96- if (pipeline_id_planner_id_map_.count (pipeline_name) == 0 ) {
96+ auto it = pipeline_id_planner_id_map_.find (pipeline_name);
97+ if (it == pipeline_id_planner_id_map_.end ()) {
9798 RCLCPP_ERROR (node_->get_logger (),
9899 " PipelinePlanner does not have a pipeline called '%s'. Cannot set pipeline ID '%s'" ,
99100 pipeline_name.c_str (), planner_id.c_str ());
100101 return false ;
101102 }
102- pipeline_id_planner_id_map_[pipeline_name] = planner_id;
103+ it-> second = planner_id;
103104 return true ;
104105}
105106
You can’t perform that action at this time.
0 commit comments