mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:37:35 +00:00
AK: Omit unnecessary function parameter names in URL
This patch removes unnecessary function parameter names in declarations of the URL class. It also changes parameter types from String to StringView where applicable.
This commit is contained in:
parent
d105747735
commit
d6709ac87d
2 changed files with 12 additions and 12 deletions
|
@ -349,7 +349,7 @@ void URL::set_host(const String& host)
|
|||
m_valid = compute_validity();
|
||||
}
|
||||
|
||||
void URL::set_port(u16 port)
|
||||
void URL::set_port(const u16 port)
|
||||
{
|
||||
m_port = port;
|
||||
m_valid = compute_validity();
|
||||
|
@ -404,12 +404,12 @@ bool URL::compute_validity() const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool URL::protocol_requires_port(const String& protocol)
|
||||
bool URL::protocol_requires_port(const StringView& protocol)
|
||||
{
|
||||
return (default_port_for_protocol(protocol) != 0);
|
||||
}
|
||||
|
||||
u16 URL::default_port_for_protocol(const String& protocol)
|
||||
u16 URL::default_port_for_protocol(const StringView& protocol)
|
||||
{
|
||||
if (protocol == "http")
|
||||
return 80;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue