From fcde8083083ffd6f517fc73c155368c3b9b431eb Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Wed, 4 Oct 2023 17:50:52 +1300 Subject: [PATCH] LibWeb: Avoid copy of local_name in HTMLParser::create_element_for --- Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp index 85b8389779..65051540d5 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp @@ -658,7 +658,7 @@ JS::NonnullGCPtr HTMLParser::create_element_for(HTMLToken const& t JS::NonnullGCPtr document = intended_parent.document(); // 4. Let local name be the tag name of the token. - auto local_name = token.tag_name(); + auto const& local_name = token.tag_name(); // 5. Let is be the value of the "is" attribute in the given token, if such an attribute exists, or null otherwise. auto is_value_deprecated_string = token.attribute(AttributeNames::is);