diff --git a/core/include/moveit/task_constructor/storage.h b/core/include/moveit/task_constructor/storage.h index 893dc09d..72d8181f 100644 --- a/core/include/moveit/task_constructor/storage.h +++ b/core/include/moveit/task_constructor/storage.h @@ -210,8 +210,6 @@ public: /// update state's priority (and call notify_ if it really has changed) void updatePriority(InterfaceState* state, const InterfaceState::Priority& priority); - /// more efficient variant of the above, because we can skip searching the state - void updatePriority(Interface::iterator it, const InterfaceState::Priority& priority); private: const NotifyFunction notify_; diff --git a/core/src/storage.cpp b/core/src/storage.cpp index 54f3a846..44082a65 100644 --- a/core/src/storage.cpp +++ b/core/src/storage.cpp @@ -142,11 +142,8 @@ void Interface::updatePriority(InterfaceState* state, const InterfaceState::Prio auto it = std::find(begin(), end(), state); // find iterator to state assert(it != end()); // state should be part of this interface - updatePriority(it, priority); -} -void Interface::updatePriority(Interface::iterator it, const InterfaceState::Priority& priority) { - it->priority_ = priority; // update priority + state->priority_ = priority; // update priority update(it); // update position in ordered list if (notify_) notify_(it, true); // notify callback