mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 15:50:49 +01:00
Replace nodes with AllocationFailures inside the tree when needed
This commit is contained in:
@@ -127,6 +127,14 @@ int TreeNode::indexOfChild(const TreeNode * child) const {
|
||||
return indexOfChildByIdentifier(child->identifier());
|
||||
}
|
||||
|
||||
int TreeNode::indexInParent() const {
|
||||
TreeNode * p = parentTree();
|
||||
if (p == nullptr) {
|
||||
return -1;
|
||||
}
|
||||
return p->indexOfChildByIdentifier(m_identifier);
|
||||
}
|
||||
|
||||
bool TreeNode::hasChild(const TreeNode * child) const {
|
||||
if (child == nullptr) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user