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

LibWeb: Pass cookie string by reference in Document::set_cookie

This string is only taken by const reference internally, so there's no
point in forcing the callers to copy the string.
This commit is contained in:
Idan Horowitz 2022-02-12 15:45:39 +02:00 committed by Linus Groh
parent 721a4a0a67
commit 5e5b94a7ec
2 changed files with 2 additions and 2 deletions

View file

@ -1006,7 +1006,7 @@ String Document::cookie(Cookie::Source source)
return {};
}
void Document::set_cookie(String cookie_string, Cookie::Source source)
void Document::set_cookie(String const& cookie_string, Cookie::Source source)
{
auto cookie = Cookie::parse_cookie(cookie_string);
if (!cookie.has_value())