From 971a66aacfd15aab56f32caff18f19dfed6eec01 Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Wed, 8 Aug 2018 13:14:14 +0200 Subject: [PATCH] [poincare] Remove boolean parameter from createTreeNode --- poincare/include/poincare/absolute_value_layout_node.h | 2 +- poincare/include/poincare/ceiling_layout_node.h | 2 +- poincare/include/poincare/conjugate_layout_node.h | 2 +- poincare/include/poincare/float.h | 2 +- poincare/include/poincare/floor_layout_node.h | 2 +- poincare/include/poincare/ghost_node.h | 2 +- poincare/include/poincare/integer.h | 2 +- poincare/include/poincare/left_parenthesis_layout_node.h | 2 +- poincare/include/poincare/left_square_bracket_layout_node.h | 2 +- poincare/include/poincare/matrix_complex.h | 2 +- poincare/include/poincare/matrix_layout_node.h | 2 +- poincare/include/poincare/nth_root_layout_node.h | 2 +- poincare/include/poincare/parenthesis.h | 2 +- poincare/include/poincare/rational.h | 2 +- poincare/include/poincare/right_parenthesis_layout_node.h | 2 +- poincare/include/poincare/right_square_bracket_layout_node.h | 2 +- poincare/include/poincare/symbol.h | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/poincare/include/poincare/absolute_value_layout_node.h b/poincare/include/poincare/absolute_value_layout_node.h index 084cb609c..99c7ba16f 100644 --- a/poincare/include/poincare/absolute_value_layout_node.h +++ b/poincare/include/poincare/absolute_value_layout_node.h @@ -27,7 +27,7 @@ private: class AbsoluteValueLayoutRef : public LayoutReference { public: AbsoluteValueLayoutRef(LayoutRef l) : - LayoutReference(TreePool::sharedPool()->createTreeNode(), true) {} + LayoutReference(TreePool::sharedPool()->createTreeNode()) {} { replaceChildAtIndexInPlace(0, l); } diff --git a/poincare/include/poincare/ceiling_layout_node.h b/poincare/include/poincare/ceiling_layout_node.h index 6b45f67cf..51898fb00 100644 --- a/poincare/include/poincare/ceiling_layout_node.h +++ b/poincare/include/poincare/ceiling_layout_node.h @@ -24,7 +24,7 @@ protected: class CeilingLayoutRef : public LayoutReference { public: - CeilingLayoutRef(LayoutRef l) : LayoutReference(TreePool::sharedPool()->createTreeNode(), true) { + CeilingLayoutRef(LayoutRef l) : LayoutReference(TreePool::sharedPool()->createTreeNode()) { replaceChildAtIndexInPlace(0, l); } }; diff --git a/poincare/include/poincare/conjugate_layout_node.h b/poincare/include/poincare/conjugate_layout_node.h index b021c3367..96cbdc3f8 100644 --- a/poincare/include/poincare/conjugate_layout_node.h +++ b/poincare/include/poincare/conjugate_layout_node.h @@ -41,7 +41,7 @@ private: class ConjugateLayoutRef : public LayoutReference { public: - ConjugateLayoutRef(LayoutRef l) : LayoutReference(TreePool::sharedPool()->createTreeNode(), true) { + ConjugateLayoutRef(LayoutRef l) : LayoutReference(TreePool::sharedPool()->createTreeNode()) { replaceChildAtIndexInPlace(0, l); } }; diff --git a/poincare/include/poincare/float.h b/poincare/include/poincare/float.h index 2af759ea4..1b7166ba9 100644 --- a/poincare/include/poincare/float.h +++ b/poincare/include/poincare/float.h @@ -54,7 +54,7 @@ private: template class FloatReference : public NumberReference { public: - FloatReference(T value) : NumberReference(TreePool::sharedPool()->createTreeNode(), true) { + FloatReference(T value) : NumberReference(TreePool::sharedPool()->createTreeNode()) { if (!node->isAllocationFailure()) { static_cast *>(node)->setFloat(value); } diff --git a/poincare/include/poincare/floor_layout_node.h b/poincare/include/poincare/floor_layout_node.h index 2d3490c63..1083c1037 100644 --- a/poincare/include/poincare/floor_layout_node.h +++ b/poincare/include/poincare/floor_layout_node.h @@ -25,7 +25,7 @@ protected: class FloorLayoutRef : public LayoutReference { public: - FloorLayoutRef(LayoutRef l) : LayoutReference(TreePool::sharedPool()->createTreeNode(), true) { + FloorLayoutRef(LayoutRef l) : LayoutReference(TreePool::sharedPool()->createTreeNode()) { replaceChildAtIndexInPlace(0, l); } }; diff --git a/poincare/include/poincare/ghost_node.h b/poincare/include/poincare/ghost_node.h index e0135b880..bd737cc80 100644 --- a/poincare/include/poincare/ghost_node.h +++ b/poincare/include/poincare/ghost_node.h @@ -24,7 +24,7 @@ public: class GhostReference : public TreeByReference { public: - GhostReference() : TreeByReference(TreePool::sharedPool()->createTreeNode(), true) {} + GhostReference() : TreeByReference(TreePool::sharedPool()->createTreeNode()) {} }; class AllocationFailedGhostNode : public GhostNode { diff --git a/poincare/include/poincare/integer.h b/poincare/include/poincare/integer.h index bdb4cd5fd..e90ac61dd 100644 --- a/poincare/include/poincare/integer.h +++ b/poincare/include/poincare/integer.h @@ -194,7 +194,7 @@ private: IntegerNode * typedNode() const { assert(node()->type() == ExpressionNode::Type::Integer); return static_cast(node()); } IntegerReference(const native_uint_t * digits, size_t numberOfDigits, bool negative); - IntegerReference(size_t size) : NumberReference(TreePool::sharedPool()->createTreeNode(size), true) { + IntegerReference(size_t size) : NumberReference(TreePool::sharedPool()->createTreeNode(size)) { } static IntegerReference addition(const IntegerReference a, const IntegerReference b, bool inverseBNegative); size_t numberOfDigits() const { return typedNode()->numberOfDigits(); } diff --git a/poincare/include/poincare/left_parenthesis_layout_node.h b/poincare/include/poincare/left_parenthesis_layout_node.h index 6a90d3e1a..212363144 100644 --- a/poincare/include/poincare/left_parenthesis_layout_node.h +++ b/poincare/include/poincare/left_parenthesis_layout_node.h @@ -33,7 +33,7 @@ protected: class LeftParenthesisLayoutRef : public LayoutReference { public: - LeftParenthesisLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode(), true) {} + LeftParenthesisLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode()) {} }; } diff --git a/poincare/include/poincare/left_square_bracket_layout_node.h b/poincare/include/poincare/left_square_bracket_layout_node.h index dba60547b..5b9454b1f 100644 --- a/poincare/include/poincare/left_square_bracket_layout_node.h +++ b/poincare/include/poincare/left_square_bracket_layout_node.h @@ -25,7 +25,7 @@ protected: class LeftSquareBracketLayoutRef : public LayoutReference { public: - LeftSquareBracketLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode(), true) {} + LeftSquareBracketLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode()) {} }; } diff --git a/poincare/include/poincare/matrix_complex.h b/poincare/include/poincare/matrix_complex.h index 7c84a9640..44d03fb25 100644 --- a/poincare/include/poincare/matrix_complex.h +++ b/poincare/include/poincare/matrix_complex.h @@ -49,7 +49,7 @@ class MatrixComplex : public Evaluation { friend class MatrixComplexNode; public: //MatrixComplex(TreeNode * t) : Evaluation(t) {} - MatrixComplex() : Evaluation(TreePool::sharedPool()->createTreeNode >(), true) {} + MatrixComplex() : Evaluation(TreePool::sharedPool()->createTreeNode >()) {} static MatrixComplex Undefined() { std::complex undef = std::complex(NAN, NAN); return MatrixComplex((std::complex *)&undef, 1, 1); diff --git a/poincare/include/poincare/matrix_layout_node.h b/poincare/include/poincare/matrix_layout_node.h index 45408df98..3049305a1 100644 --- a/poincare/include/poincare/matrix_layout_node.h +++ b/poincare/include/poincare/matrix_layout_node.h @@ -55,7 +55,7 @@ private: class MatrixLayoutRef : public LayoutReference { friend class MatrixLayoutNode; public: - MatrixLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode(), true) {} + MatrixLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode()) {} MatrixLayoutRef(LayoutRef l1, LayoutRef l2, LayoutRef l3, LayoutRef l4) : MatrixLayoutRef() diff --git a/poincare/include/poincare/nth_root_layout_node.h b/poincare/include/poincare/nth_root_layout_node.h index df8d6a28f..348ce1b4b 100644 --- a/poincare/include/poincare/nth_root_layout_node.h +++ b/poincare/include/poincare/nth_root_layout_node.h @@ -79,7 +79,7 @@ public: } private: - NthRootLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode(), true) {} + NthRootLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode()) {} }; } diff --git a/poincare/include/poincare/parenthesis.h b/poincare/include/poincare/parenthesis.h index b8467c63e..386d9c9a2 100644 --- a/poincare/include/poincare/parenthesis.h +++ b/poincare/include/poincare/parenthesis.h @@ -36,7 +36,7 @@ private: class ParenthesisReference : public ExpressionReference { public: - ParenthesisReference(ExpressionReference exp) : ExpressionReference(TreePool::sharedPool()->createTreeNode(), true) { + ParenthesisReference(ExpressionReference exp) : ExpressionReference(TreePool::sharedPool()->createTreeNode()) { replaceChildAtIndexInPlace(0, exp); } }; diff --git a/poincare/include/poincare/rational.h b/poincare/include/poincare/rational.h index 29f100d96..7e6dde59f 100644 --- a/poincare/include/poincare/rational.h +++ b/poincare/include/poincare/rational.h @@ -84,7 +84,7 @@ public: static int NaturalOrder(const RationalReference i, const RationalReference j); private: - RationalReference(size_t size) : NumberReference(TreePool::sharedPool()->createTreeNode(size), true) {} + RationalReference(size_t size) : NumberReference(TreePool::sharedPool()->createTreeNode(size)) {} }; } diff --git a/poincare/include/poincare/right_parenthesis_layout_node.h b/poincare/include/poincare/right_parenthesis_layout_node.h index 1bdd62eff..3fdd7f76e 100644 --- a/poincare/include/poincare/right_parenthesis_layout_node.h +++ b/poincare/include/poincare/right_parenthesis_layout_node.h @@ -33,7 +33,7 @@ protected: class RightParenthesisLayoutRef : public LayoutReference { public: - RightParenthesisLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode(), true) {} + RightParenthesisLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode()) {} }; } diff --git a/poincare/include/poincare/right_square_bracket_layout_node.h b/poincare/include/poincare/right_square_bracket_layout_node.h index 1e27bb95a..01b6072e3 100644 --- a/poincare/include/poincare/right_square_bracket_layout_node.h +++ b/poincare/include/poincare/right_square_bracket_layout_node.h @@ -26,7 +26,7 @@ protected: class RightSquareBracketLayoutRef : public LayoutReference { public: - RightSquareBracketLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode(), true) {} + RightSquareBracketLayoutRef() : LayoutReference(TreePool::sharedPool()->createTreeNode()) {} }; diff --git a/poincare/include/poincare/symbol.h b/poincare/include/poincare/symbol.h index 0e0038976..f844f4b29 100644 --- a/poincare/include/poincare/symbol.h +++ b/poincare/include/poincare/symbol.h @@ -83,7 +83,7 @@ public: X3, Y3 = 29 }; - SymbolReference(const char name) : ExpressionReference(TreePool::sharedPool()->createTreeNode(), true) { + SymbolReference(const char name) : ExpressionReference(TreePool::sharedPool()->createTreeNode()) { if (!node->isAllocationFailure()) { static_cast(node)->setName(name); }