StaticAllocationFailureNodes are not stored in the pool

This commit is contained in:
Léa Saviot
2018-06-29 15:30:40 +02:00
parent 8117e73561
commit a4471e1570
13 changed files with 68 additions and 32 deletions

View File

@@ -7,6 +7,11 @@ TreePool * TreePool::sharedPool() {
}
TreeNode * TreePool::node(int identifier) const {
if (identifier < 0) {
int index = indexOfStaticNode(identifier);
assert(index >= 0 && index < MaxNumberOfStaticNodes);
return m_staticNodes[index];
}
assert(identifier >= 0 && identifier <= MaxNumberOfNodes);
return m_nodeForIdentifier[identifier];
}