mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 01:29:58 +01:00
Fix AllocationFailure when multiple instances
This commit is contained in:
@@ -12,10 +12,11 @@ public:
|
||||
using TreeReference<T>::TreeReference;
|
||||
|
||||
// Allow every ExpressionReference<T> to be transformed into an ExpressionReference<ExpressionNode>, i.e. Expression
|
||||
operator ExpressionReference<ExpressionNode>() const {
|
||||
operator ExpressionReference<ExpressionNode>() {
|
||||
return ExpressionReference<ExpressionNode>(this->node());
|
||||
}
|
||||
|
||||
static ExpressionReference<ExpressionNode> failedAllocationRef();
|
||||
static TreeNode * failedAllocationNode();
|
||||
|
||||
void addChild(ExpressionReference<ExpressionNode> e) {
|
||||
@@ -32,7 +33,7 @@ public:
|
||||
TreeReference<T>::replaceChildAtIndex(oldChildIndex, newChild);
|
||||
}
|
||||
|
||||
float approximate() const {
|
||||
float approximate() {
|
||||
return this->castedNode()->approximate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user