From 41e5a0fe0202155a663e6a61a5d8fb27d405e784 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 6 Apr 2021 14:18:32 +0200 Subject: LibWeb: Remove duplicated code in TreeNode::remove_child() We were assigning to m_first_child twice. --- Userland/Libraries/LibWeb/TreeNode.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'Userland/Libraries/LibWeb/TreeNode.h') diff --git a/Userland/Libraries/LibWeb/TreeNode.h b/Userland/Libraries/LibWeb/TreeNode.h index c304230e7b..35f9a960e2 100644 --- a/Userland/Libraries/LibWeb/TreeNode.h +++ b/Userland/Libraries/LibWeb/TreeNode.h @@ -397,9 +397,6 @@ inline void TreeNode::insert_before(NonnullRefPtr node, RefPtr child, b child->m_previous_sibling = node; - if (m_first_child == child) - m_first_child = node; - node->m_parent = static_cast(this); if (notify) node->inserted_into(static_cast(*this)); -- cgit v1.2.3