Check recursively for Empty BpNodes

In BpNode::recalculateState() the BpNode needs to be recursively checked if its children is empty using BpNode::isEmpty() instead of BpNode::hasChildren().
This commit is contained in:
Ravi Kumar Kempapura Srinivasa 2020-03-03 16:46:48 +01:00 committed by Eric Lippmann
parent e19612bd4a
commit 6cc5eb8e74

View file

@ -374,7 +374,7 @@ class BpNode extends Node
$sort_states = array();
$lastStateChange = 0;
if (!$this->hasChildren()) {
if ($this->isEmpty()) {
// TODO: delegate this to operators, should mostly fail
$this->setState(self::NODE_EMPTY);
return $this;