[poincare] Remove boolean parameter from createTreeNode

This commit is contained in:
Romain Goyet
2018-08-08 13:14:14 +02:00
parent 86a1822e41
commit 971a66aacf
17 changed files with 17 additions and 17 deletions

View File

@@ -27,7 +27,7 @@ private:
class AbsoluteValueLayoutRef : public LayoutReference {
public:
AbsoluteValueLayoutRef(LayoutRef l) :
LayoutReference(TreePool::sharedPool()->createTreeNode<AbsoluteValueLayoutNode>(), true) {}
LayoutReference(TreePool::sharedPool()->createTreeNode<AbsoluteValueLayoutNode>()) {}
{
replaceChildAtIndexInPlace(0, l);
}

View File

@@ -24,7 +24,7 @@ protected:
class CeilingLayoutRef : public LayoutReference {
public:
CeilingLayoutRef(LayoutRef l) : LayoutReference(TreePool::sharedPool()->createTreeNode<CeilingLayoutNode>(), true) {
CeilingLayoutRef(LayoutRef l) : LayoutReference(TreePool::sharedPool()->createTreeNode<CeilingLayoutNode>()) {
replaceChildAtIndexInPlace(0, l);
}
};

View File

@@ -41,7 +41,7 @@ private:
class ConjugateLayoutRef : public LayoutReference {
public:
ConjugateLayoutRef(LayoutRef l) : LayoutReference(TreePool::sharedPool()->createTreeNode<ConjugateLayoutNode>(), true) {
ConjugateLayoutRef(LayoutRef l) : LayoutReference(TreePool::sharedPool()->createTreeNode<ConjugateLayoutNode>()) {
replaceChildAtIndexInPlace(0, l);
}
};

View File

@@ -54,7 +54,7 @@ private:
template<typename T>
class FloatReference : public NumberReference {
public:
FloatReference(T value) : NumberReference(TreePool::sharedPool()->createTreeNode<RationalNode>(), true) {
FloatReference(T value) : NumberReference(TreePool::sharedPool()->createTreeNode<RationalNode>()) {
if (!node->isAllocationFailure()) {
static_cast<FloatNode<T> *>(node)->setFloat(value);
}

View File

@@ -25,7 +25,7 @@ protected:
class FloorLayoutRef : public LayoutReference {
public:
FloorLayoutRef(LayoutRef l) : LayoutReference(TreePool::sharedPool()->createTreeNode<FloorLayoutNode>(), true) {
FloorLayoutRef(LayoutRef l) : LayoutReference(TreePool::sharedPool()->createTreeNode<FloorLayoutNode>()) {
replaceChildAtIndexInPlace(0, l);
}
};

View File

@@ -24,7 +24,7 @@ public:
class GhostReference : public TreeByReference {
public:
GhostReference() : TreeByReference(TreePool::sharedPool()->createTreeNode<GhostNode>(), true) {}
GhostReference() : TreeByReference(TreePool::sharedPool()->createTreeNode<GhostNode>()) {}
};
class AllocationFailedGhostNode : public GhostNode {

View File

@@ -194,7 +194,7 @@ private:
IntegerNode * typedNode() const { assert(node()->type() == ExpressionNode::Type::Integer); return static_cast<IntegerNode *>(node()); }
IntegerReference(const native_uint_t * digits, size_t numberOfDigits, bool negative);
IntegerReference(size_t size) : NumberReference(TreePool::sharedPool()->createTreeNode<IntegerNode>(size), true) {
IntegerReference(size_t size) : NumberReference(TreePool::sharedPool()->createTreeNode<IntegerNode>(size)) {
}
static IntegerReference addition(const IntegerReference a, const IntegerReference b, bool inverseBNegative);
size_t numberOfDigits() const { return typedNode()->numberOfDigits(); }

View File

@@ -33,7 +33,7 @@ protected:
class LeftParenthesisLayoutRef : public LayoutReference {
public:
LeftParenthesisLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode<LeftParenthesisLayoutNode>(), true) {}
LeftParenthesisLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode<LeftParenthesisLayoutNode>()) {}
};
}

View File

@@ -25,7 +25,7 @@ protected:
class LeftSquareBracketLayoutRef : public LayoutReference {
public:
LeftSquareBracketLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode<LeftSquareBracketLayoutNode>(), true) {}
LeftSquareBracketLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode<LeftSquareBracketLayoutNode>()) {}
};
}

View File

@@ -49,7 +49,7 @@ class MatrixComplex : public Evaluation<T> {
friend class MatrixComplexNode<T>;
public:
//MatrixComplex(TreeNode * t) : Evaluation<T>(t) {}
MatrixComplex() : Evaluation<T>(TreePool::sharedPool()->createTreeNode<MatrixComplexNode<T> >(), true) {}
MatrixComplex() : Evaluation<T>(TreePool::sharedPool()->createTreeNode<MatrixComplexNode<T> >()) {}
static MatrixComplex<T> Undefined() {
std::complex<T> undef = std::complex<T>(NAN, NAN);
return MatrixComplex<T>((std::complex<T> *)&undef, 1, 1);

View File

@@ -55,7 +55,7 @@ private:
class MatrixLayoutRef : public LayoutReference {
friend class MatrixLayoutNode;
public:
MatrixLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode<MatrixLayoutNode>(), true) {}
MatrixLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode<MatrixLayoutNode>()) {}
MatrixLayoutRef(LayoutRef l1, LayoutRef l2, LayoutRef l3, LayoutRef l4) :
MatrixLayoutRef()

View File

@@ -79,7 +79,7 @@ public:
}
private:
NthRootLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode<NthRootLayoutNode>(), true) {}
NthRootLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode<NthRootLayoutNode>()) {}
};
}

View File

@@ -36,7 +36,7 @@ private:
class ParenthesisReference : public ExpressionReference {
public:
ParenthesisReference(ExpressionReference exp) : ExpressionReference(TreePool::sharedPool()->createTreeNode<ParenthesisNode>(), true) {
ParenthesisReference(ExpressionReference exp) : ExpressionReference(TreePool::sharedPool()->createTreeNode<ParenthesisNode>()) {
replaceChildAtIndexInPlace(0, exp);
}
};

View File

@@ -84,7 +84,7 @@ public:
static int NaturalOrder(const RationalReference i, const RationalReference j);
private:
RationalReference(size_t size) : NumberReference(TreePool::sharedPool()->createTreeNode<RationalNode>(size), true) {}
RationalReference(size_t size) : NumberReference(TreePool::sharedPool()->createTreeNode<RationalNode>(size)) {}
};
}

View File

@@ -33,7 +33,7 @@ protected:
class RightParenthesisLayoutRef : public LayoutReference {
public:
RightParenthesisLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode<RightParenthesisLayoutNode>(), true) {}
RightParenthesisLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode<RightParenthesisLayoutNode>()) {}
};
}

View File

@@ -26,7 +26,7 @@ protected:
class RightSquareBracketLayoutRef : public LayoutReference {
public:
RightSquareBracketLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode<RightSquareBracketLayoutNode>(), true) {}
RightSquareBracketLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode<RightSquareBracketLayoutNode>()) {}
};

View File

@@ -83,7 +83,7 @@ public:
X3,
Y3 = 29
};
SymbolReference(const char name) : ExpressionReference(TreePool::sharedPool()->createTreeNode<SymbolNode>(), true) {
SymbolReference(const char name) : ExpressionReference(TreePool::sharedPool()->createTreeNode<SymbolNode>()) {
if (!node->isAllocationFailure()) {
static_cast<SymbolNode *>(node)->setName(name);
}