Commit 226d4e65 authored by Erwan Tulou's avatar Erwan Tulou

skins2: VarTree, make root() a private function

parent 86205b1e
...@@ -111,15 +111,6 @@ public: ...@@ -111,15 +111,6 @@ public:
Iterator next_uncle(); Iterator next_uncle();
Iterator prev_uncle(); Iterator prev_uncle();
/// Get root node
VarTree *root()
{
VarTree *parent = this;
while( parent->parent() != NULL )
parent = parent->parent();
return parent;
}
/// Get first leaf /// Get first leaf
Iterator firstLeaf(); Iterator firstLeaf();
...@@ -187,6 +178,16 @@ public: ...@@ -187,6 +178,16 @@ public:
private: private:
/// Get root node
VarTree *root()
{
VarTree *parent = this;
while( parent->parent() != NULL )
parent = parent->parent();
return parent;
}
/// List of children /// List of children
list<VarTree> m_children; list<VarTree> m_children;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment