diff options
author | Hendiadyoin1 <leon.a@serenityos.org> | 2022-03-21 00:15:26 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-21 10:48:17 +0100 |
commit | 6e921ae304f87a19b1c1a9818481d8af36d09a91 (patch) | |
tree | 85a3a90e7f4022b08e590934d78ecb69aa210eb3 /Userland/Libraries/LibWeb | |
parent | 6a95df25264b4f5e616608dd02826b61e25e1112 (diff) | |
download | serenity-6e921ae304f87a19b1c1a9818481d8af36d09a91.zip |
LibWeb: Move passed string in MimeType constructor
This was pointed out by Clang-Tidy and should avoid an allocation.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp b/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp index f19ed86551..ae13e676de 100644 --- a/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp +++ b/Userland/Libraries/LibWeb/MimeSniff/MimeType.cpp @@ -26,8 +26,8 @@ static bool contains_only_http_quoted_string_token_code_points(StringView string } MimeType::MimeType(String type, String subtype) - : m_type(type) - , m_subtype(subtype) + : m_type(move(type)) + , m_subtype(move(subtype)) { // https://mimesniff.spec.whatwg.org/#parameters // A MIME type’s parameters is an ordered map whose keys are ASCII strings and values are strings limited to HTTP quoted-string token code points. |