Make child and data of a Node public

This is necessary so that other algorithms can traverse the hierarchy.
This commit is contained in:
Philipp Möller 2015-10-27 12:29:33 +01:00 committed by Sébastien Loriot
parent 2540612e97
commit 33bc6f125f
1 changed files with 2 additions and 0 deletions

View File

@ -97,6 +97,8 @@ private:
const Primitive& right_data() const
{ return *static_cast<Primitive*>(m_p_right_child); }
public:
Node& left_child() { return *static_cast<Node*>(m_p_left_child); }
Node& right_child() { return *static_cast<Node*>(m_p_right_child); }
Primitive& left_data() { return *static_cast<Primitive*>(m_p_left_child); }