diff --git a/core/include/moveit/task_constructor/container_p.h b/core/include/moveit/task_constructor/container_p.h index 26fb099e..226e7efd 100644 --- a/core/include/moveit/task_constructor/container_p.h +++ b/core/include/moveit/task_constructor/container_p.h @@ -119,18 +119,16 @@ public: protected: ContainerBasePrivate(ContainerBase* me, const std::string& name); - // Set child's push interfaces: allow pushing if child requires it or - // if the interface is unknown: in this case greedily assume a push interface. - // If, during pruneInterface() later, we notice that it's not needed, prune there. - inline void setChildsPushBackwardInterface(Stage& child) { - InterfaceFlags required = child.pimpl()->requiredInterface(); + // Set child's push interfaces: allow pushing if child requires it. + inline void setChildsPushBackwardInterface(StagePrivate* child) { + InterfaceFlags required = child->requiredInterface(); bool allowed = (required & WRITES_PREV_END); - child.pimpl()->setPrevEnds(allowed ? pending_backward_ : InterfacePtr()); + child->setPrevEnds(allowed ? pending_backward_ : InterfacePtr()); } - inline void setChildsPushForwardInterface(Stage& child) { - InterfaceFlags required = child.pimpl()->requiredInterface(); + inline void setChildsPushForwardInterface(StagePrivate* child) { + InterfaceFlags required = child->requiredInterface(); bool allowed = (required & WRITES_NEXT_START); - child.pimpl()->setNextStarts(allowed ? pending_forward_ : InterfacePtr()); + child->setNextStarts(allowed ? pending_forward_ : InterfacePtr()); } /// copy external_state to a child's interface and remember the link in internal_to map diff --git a/core/src/container.cpp b/core/src/container.cpp index 8e8d47b2..e90906d3 100644 --- a/core/src/container.cpp +++ b/core/src/container.cpp @@ -436,7 +436,7 @@ void SerialContainerPrivate::pruneInterface(InterfaceFlags accepted) { // FIRST child first.pimpl()->pruneInterface(accepted & START_IF_MASK); // connect first child's (start) push interface - setChildsPushBackwardInterface(first); + setChildsPushBackwardInterface(first.pimpl()); // validate that first child's and this container's start interfaces match validateInterface(*first.pimpl(), accepted); // connect first child's (start) pull interface @@ -453,7 +453,7 @@ void SerialContainerPrivate::pruneInterface(InterfaceFlags accepted) { } // connect last child's (end) push interface - setChildsPushForwardInterface(last); + setChildsPushForwardInterface(last.pimpl()); // validate that last child's and this container's end interfaces match validateInterface(*last.pimpl(), accepted); // connect last child's (end) pull interface @@ -566,8 +566,8 @@ void ParallelContainerBasePrivate::pruneInterface(InterfaceFlags accepted) { child_impl->pruneInterface(accepted); validateInterfaces(*child_impl, accepted, first); // initialize push connections of children according to their demands - setChildsPushForwardInterface(*child); - setChildsPushBackwardInterface(*child); + setChildsPushForwardInterface(child_impl); + setChildsPushBackwardInterface(child_impl); first = false; } catch (InitStageException& e) { exceptions.append(e);