mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03: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
Notes:
sideshowbarker
2024-07-18 04:38:32 +09:00
Author: https://github.com/Hendiadyoin1 Commit: https://github.com/SerenityOS/serenity/commit/6e921ae304 Pull-request: https://github.com/SerenityOS/serenity/pull/13168
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user