From f7348c181302ebbe7bbd3c81ae2e3ddd2326a7f1 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 21 Aug 2018 22:25:57 +0200 Subject: [PATCH] [DEBUG] correct tree node element --- etk/FlatTree.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/etk/FlatTree.hpp b/etk/FlatTree.hpp index 6054aba..a5631a3 100644 --- a/etk/FlatTree.hpp +++ b/etk/FlatTree.hpp @@ -45,8 +45,8 @@ namespace etk { append(_root); } void setRoot(const ememory::SharedPtr>& _root, - const etk::Function& _needAdd, - const etk::Function& _needAddChild) { + const etk::Function& _needAdd, + const etk::Function& _needAddChild) { m_data.clear(); append(_root, _needAdd, _needAddChild); } @@ -61,17 +61,17 @@ namespace etk { } } void append(const ememory::SharedPtr>& _node, - const etk::Function& _needAdd, - const etk::Function& _needAddChild) { + const etk::Function& _needAdd, + const etk::Function& _needAddChild) { if (_node == null) { return; } - if (_needAdd(&_node->getData()) == true) { + if (_needAdd(_node->getData()) == true) { m_data.pushBack(_node); } - if (_needAddChild(&_node->getData()) == true) { + if (_needAddChild(_node->getData()) == true) { for (auto& it:_node->getChilds()) { - append(it); + append(it, _needAdd, _needAddChild); } } }