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:
parent
6a95df2526
commit
6e921ae304
1 changed files with 2 additions and 2 deletions
|
@ -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 type’s parameters is an ordered map whose keys are ASCII strings and values are strings limited to HTTP quoted-string token code points.
|
// 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.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue