From 0758bc457e07c171bccbdd72517d232dcf929910 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sun, 6 Nov 2022 00:45:27 +0100 Subject: [PATCH] LibWeb: Replace some unnecessary ShadowRoot verify_cast with static_cast These two occurrences of verify_cast happened right after a check on the type of converted reference, making the verify_cast redundant. --- Userland/Libraries/LibWeb/DOM/Node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/DOM/Node.cpp b/Userland/Libraries/LibWeb/DOM/Node.cpp index d249c0b140..92598abc74 100644 --- a/Userland/Libraries/LibWeb/DOM/Node.cpp +++ b/Userland/Libraries/LibWeb/DOM/Node.cpp @@ -291,7 +291,7 @@ Node& Node::shadow_including_root() // if the object’s root is a shadow root; otherwise its root. auto& node_root = root(); if (is(node_root)) - return verify_cast(node_root).host()->shadow_including_root(); + return static_cast(node_root).host()->shadow_including_root(); return node_root; } @@ -868,7 +868,7 @@ void Node::inserted() ParentNode* Node::parent_or_shadow_host() { if (is(*this)) - return verify_cast(*this).host(); + return static_cast(*this).host(); return verify_cast(parent()); }