diff options
author | Andreas Kling <kling@serenityos.org> | 2020-10-22 23:14:23 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-10-22 23:14:23 +0200 |
commit | 8de743a878dcee9e7fec9a9b8993bf06bccde43f (patch) | |
tree | 4c63717cbca3783e03e4d15bbeca2488d7452977 /Libraries/LibWeb | |
parent | 385d7449896171d6df90dae144ed1a3dac4528c6 (diff) | |
download | serenity-8de743a878dcee9e7fec9a9b8993bf06bccde43f.zip |
LibWeb: Remove unused TreeNode::donate_all_children_to()
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r-- | Libraries/LibWeb/TreeNode.h | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/Libraries/LibWeb/TreeNode.h b/Libraries/LibWeb/TreeNode.h index 5f1fef9d1f..5221e260f9 100644 --- a/Libraries/LibWeb/TreeNode.h +++ b/Libraries/LibWeb/TreeNode.h @@ -99,7 +99,6 @@ public: void append_child(NonnullRefPtr<T> node, bool notify = true); void insert_before(NonnullRefPtr<T> node, RefPtr<T> child, bool notify = true); NonnullRefPtr<T> remove_child(NonnullRefPtr<T> node); - void donate_all_children_to(T& node); bool is_child_allowed(const T&) const { return true; } @@ -392,24 +391,6 @@ inline void TreeNode<T>::prepend_child(NonnullRefPtr<T> node) } template<typename T> -inline void TreeNode<T>::donate_all_children_to(T& node) -{ - for (T* child = m_first_child; child != nullptr;) { - T* next_child = child->m_next_sibling; - - child->m_parent = nullptr; - child->m_next_sibling = nullptr; - child->m_previous_sibling = nullptr; - - node.append_child(adopt(*child)); - child = next_child; - } - - m_first_child = nullptr; - m_last_child = nullptr; -} - -template<typename T> inline bool TreeNode<T>::is_ancestor_of(const TreeNode<T>& other) const { for (auto* ancestor = other.parent(); ancestor; ancestor = ancestor->parent()) { |