diff options
author | Max Wipfli <mail@maxwipfli.ch> | 2021-05-31 11:44:13 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-01 09:28:05 +0200 |
commit | d6709ac87d75b601806466df29c46485482f89d1 (patch) | |
tree | 3d98f3f36866bc70b56c78e06fb2d236860bf83d /AK/URL.cpp | |
parent | d105747735357b37e968ded71532528426d60763 (diff) | |
download | serenity-d6709ac87d75b601806466df29c46485482f89d1.zip |
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.
Diffstat (limited to 'AK/URL.cpp')
-rw-r--r-- | AK/URL.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/AK/URL.cpp b/AK/URL.cpp index 626ba1c3c1..707b0e5426 100644 --- a/AK/URL.cpp +++ b/AK/URL.cpp @@ -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; |