1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:07:36 +00:00

LibWeb: Move passed string in MimeType constructor

This was pointed out by Clang-Tidy and should avoid an allocation.
This commit is contained in:
Hendiadyoin1 2022-03-21 00:15:26 +01:00 committed by Andreas Kling
parent 6a95df2526
commit 6e921ae304

View file

@ -26,8 +26,8 @@ static bool contains_only_http_quoted_string_token_code_points(StringView string
} }
MimeType::MimeType(String type, String subtype) MimeType::MimeType(String type, String subtype)
: m_type(type) : m_type(move(type))
, m_subtype(subtype) , m_subtype(move(subtype))
{ {
// https://mimesniff.spec.whatwg.org/#parameters // https://mimesniff.spec.whatwg.org/#parameters
// A MIME types parameters is an ordered map whose keys are ASCII strings and values are strings limited to HTTP quoted-string token code points. // A MIME types parameters is an ordered map whose keys are ASCII strings and values are strings limited to HTTP quoted-string token code points.