diff --git a/core/include/moveit/task_constructor/cost_terms.h b/core/include/moveit/task_constructor/cost_terms.h index 91c0ab8f..2c2d7af4 100644 --- a/core/include/moveit/task_constructor/cost_terms.h +++ b/core/include/moveit/task_constructor/cost_terms.h @@ -8,15 +8,14 @@ namespace cost { /// These structures all implement the Stage::CostTerm API and can be configured via Stage::setCostTerm() /// add a constant cost to each solution -class ConstantCost +struct ConstantCost { public: - ConstantCost(double cost) : cost_(cost) {} + ConstantCost(double c) : cost(c) {} - double operator()(const SubTrajectory&) { return cost_; } + double operator()(const SubTrajectory&, std::string& /* unused */) const { return cost; } -private: - double cost_; + double cost; }; /// execution duration of the whole trajectory