From 4538d53bb27b9725e84b11f99ba238e37cb3ad27 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Fri, 29 Sep 2017 03:54:13 -0700 Subject: [PATCH] fix for-loop argument types --- include/moveit_task_constructor/debug.h | 2 +- src/debug.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/moveit_task_constructor/debug.h b/include/moveit_task_constructor/debug.h index 1be8293a..9abed55b 100644 --- a/include/moveit_task_constructor/debug.h +++ b/include/moveit_task_constructor/debug.h @@ -17,7 +17,7 @@ bool publishSolution(ros::Publisher& pub, moveit_msgs::DisplayTrajectory& dt, void publishAllPlans(const Task &task, const std::string &topic = "task_plan", bool wait = true); class NewSolutionPublisher { - std::set published; + std::set published; const Task &task; ros::Publisher pub; diff --git a/src/debug.cpp b/src/debug.cpp index 094ffad3..861d40bc 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -10,7 +10,7 @@ namespace moveit { namespace task_constructor { bool publishSolution(ros::Publisher& pub, moveit_msgs::DisplayTrajectory& dt, std::vector& solution, bool wait){ dt.trajectory.clear(); - for(SubTrajectory*& t : solution){ + for(const SubTrajectory* t : solution){ if(t->trajectory){ dt.trajectory.emplace_back(); t->trajectory->getRobotTrajectoryMsg(dt.trajectory.back()); @@ -55,7 +55,7 @@ void NewSolutionPublisher::publish() Task::SolutionCallback processor = [this,&dt](std::vector& solution) { bool all_published = true; - for(SubTrajectory*& t : solution){ + for(const SubTrajectory* t : solution){ auto result = published.insert(t); // if t was not yet published, the insertion yields result.second == true all_published &= !result.second;