mirror of
https://github.com/sogou/workflow.git
synced 2026-10-21 22:56:42 +08:00
Update WFGraphNode
This commit is contained in:
@@ -30,14 +30,18 @@ SubTask *WFGraphNode::done()
|
||||
this->user_data = (void *)1;
|
||||
}
|
||||
else
|
||||
delete this;
|
||||
|
||||
return series->pop();
|
||||
}
|
||||
|
||||
WFGraphNode::~WFGraphNode()
|
||||
{
|
||||
if (this->user_data)
|
||||
{
|
||||
for (WFGraphNode *node : this->successors)
|
||||
node->WFCounterTask::count();
|
||||
|
||||
delete this;
|
||||
}
|
||||
|
||||
return series->pop();
|
||||
}
|
||||
|
||||
WFGraphNode& WFGraphTask::create_graph_node(SubTask *task)
|
||||
|
||||
@@ -47,7 +47,7 @@ protected:
|
||||
|
||||
protected:
|
||||
WFGraphNode() : WFCounterTask(0, nullptr) { }
|
||||
virtual ~WFGraphNode() { }
|
||||
virtual ~WFGraphNode();
|
||||
friend class WFGraphTask;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user