diff --git a/char_layout_node.h b/char_layout_node.h index 3ea2f04ed..71efb07b1 100644 --- a/char_layout_node.h +++ b/char_layout_node.h @@ -50,7 +50,7 @@ private: class CharLayoutRef : public LayoutReference { public: CharLayoutRef(char c) : LayoutReference() { - this->node()->setChar(c); + this->castedNode()->setChar(c); //TODO use init } }; diff --git a/expression_reference.h b/expression_reference.h index 78e3f1338..9b02d944d 100644 --- a/expression_reference.h +++ b/expression_reference.h @@ -33,7 +33,7 @@ public: } float approximate() const { - return this->node()->approximate(); + return this->castedNode()->approximate(); } /* diff --git a/float_node.h b/float_node.h index 555e714a9..36ccfc317 100644 --- a/float_node.h +++ b/float_node.h @@ -22,7 +22,7 @@ private: class FloatRef : public ExpressionReference { public: FloatRef(float f) : ExpressionReference() { - this->uncastedNode()->init(f); + this->node()->init(f); } }; diff --git a/layout_cursor.cpp b/layout_cursor.cpp index 73445d4b7..aff142e85 100644 --- a/layout_cursor.cpp +++ b/layout_cursor.cpp @@ -20,19 +20,19 @@ int LayoutCursor::middleLeftPoint() { /* Move */ void LayoutCursor::moveLeft(bool * shouldRecomputeLayout) { - layoutReference().node()->moveCursorLeft(this, shouldRecomputeLayout); + layoutReference().castedNode()->moveCursorLeft(this, shouldRecomputeLayout); } void LayoutCursor::moveRight(bool * shouldRecomputeLayout) { - layoutReference().node()->moveCursorRight(this, shouldRecomputeLayout); + layoutReference().castedNode()->moveCursorRight(this, shouldRecomputeLayout); } void LayoutCursor::moveAbove(bool * shouldRecomputeLayout) { - layoutReference().node()->moveCursorUp(this, shouldRecomputeLayout); + layoutReference().castedNode()->moveCursorUp(this, shouldRecomputeLayout); } void LayoutCursor::moveUnder(bool * shouldRecomputeLayout) { - layoutReference().node()->moveCursorDown(this, shouldRecomputeLayout); + layoutReference().castedNode()->moveCursorDown(this, shouldRecomputeLayout); } diff --git a/layout_reference.cpp b/layout_reference.cpp index 35de1075f..ca87dc84b 100644 --- a/layout_reference.cpp +++ b/layout_reference.cpp @@ -12,7 +12,7 @@ TreeNode * LayoutRef::failedAllocationNode() { template LayoutCursor LayoutReference::cursor() const { - return LayoutCursor(this->node()); + return LayoutCursor(this->castedNode()); } template LayoutCursor LayoutReference::cursor() const; diff --git a/layout_reference.h b/layout_reference.h index 0e347cfa0..c93316ce7 100644 --- a/layout_reference.h +++ b/layout_reference.h @@ -32,11 +32,11 @@ public: } int layoutOrigin() { - return this->node()->layoutOrigin(); + return this->castedNode()->layoutOrigin(); } int absoluteOrigin() { - return this->node()->absoluteOrigin(); + return this->castedNode()->absoluteOrigin(); } }; diff --git a/tree_reference.h b/tree_reference.h index 6c02fe7d5..3f7626b99 100644 --- a/tree_reference.h +++ b/tree_reference.h @@ -60,13 +60,13 @@ public: return TreeReference(this->node()); } - T * node() const { + T * castedNode() const { // TODO: Here, assert that the node type is indeed T // ?? Might be allocation failure, not T return static_cast(TreePool::sharedPool()->node(m_identifier)); } - TreeNode * uncastedNode() const { + TreeNode * node() const { return TreePool::sharedPool()->node(m_identifier); }