Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Jul 18, 2024
1 parent 972c276 commit f3a1abe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 3 additions & 2 deletions core/include/moveit/task_constructor/stage_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class PreemptStageException : public std::exception
{
public:
explicit PreemptStageException() {}
const char* what() const noexcept override { return ""; }
};

class ContainerBase;
Expand Down Expand Up @@ -171,7 +170,9 @@ class StagePrivate
/** compute cost for solution through configured CostTerm */
void computeCost(const InterfaceState& from, const InterfaceState& to, SolutionBase& solution);

void setPreemptRequestedMember(const std::atomic<bool>* preempt_requested);
void setPreemptRequestedMember(const std::atomic<bool>* preempt_requested) {
preempt_requested_ = preempt_requested;
}
bool preempted() const { return preempt_requested_ != nullptr && *preempt_requested_; }

protected:
Expand Down
4 changes: 0 additions & 4 deletions core/src/stage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,6 @@ void StagePrivate::computeCost(const InterfaceState& from, const InterfaceState&
}
}

void StagePrivate::setPreemptRequestedMember(const std::atomic<bool>* preempt_requested) {
preempt_requested_ = preempt_requested;
}

Stage::Stage(StagePrivate* impl) : pimpl_(impl) {
assert(impl);
auto& p = properties();
Expand Down
2 changes: 1 addition & 1 deletion core/src/task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void Task::init() {
// task expects its wrapped child to push to both ends, this triggers interface resolution
stages()->pimpl()->resolveInterface(InterfaceFlags({ GENERATE }));

// provide introspection instance and prempted requested to all stages
// provide introspection instance and preempt_requested to all stages
auto* introspection = impl->introspection_.get();
impl->traverseStages(
[introspection, impl](Stage& stage, int /*depth*/) {
Expand Down

0 comments on commit f3a1abe

Please sign in to comment.