mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:47:35 +00:00
LibWeb: Remove unused TreeNode::donate_all_children_to()
This commit is contained in:
parent
385d744989
commit
8de743a878
1 changed files with 0 additions and 19 deletions
|
@ -99,7 +99,6 @@ public:
|
||||||
void append_child(NonnullRefPtr<T> node, bool notify = true);
|
void append_child(NonnullRefPtr<T> node, bool notify = true);
|
||||||
void insert_before(NonnullRefPtr<T> node, RefPtr<T> child, bool notify = true);
|
void insert_before(NonnullRefPtr<T> node, RefPtr<T> child, bool notify = true);
|
||||||
NonnullRefPtr<T> remove_child(NonnullRefPtr<T> node);
|
NonnullRefPtr<T> remove_child(NonnullRefPtr<T> node);
|
||||||
void donate_all_children_to(T& node);
|
|
||||||
|
|
||||||
bool is_child_allowed(const T&) const { return true; }
|
bool is_child_allowed(const T&) const { return true; }
|
||||||
|
|
||||||
|
@ -391,24 +390,6 @@ inline void TreeNode<T>::prepend_child(NonnullRefPtr<T> node)
|
||||||
static_cast<T*>(this)->children_changed();
|
static_cast<T*>(this)->children_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
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>
|
template<typename T>
|
||||||
inline bool TreeNode<T>::is_ancestor_of(const TreeNode<T>& other) const
|
inline bool TreeNode<T>::is_ancestor_of(const TreeNode<T>& other) const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue