AK: Change URL::cannot_be_a_base_url, URL::is_valid return type to bool
There's no need to return a const reference (8 bytes) when the value is always used as a temporary bool (1 byte).
This commit is contained in:
parent
55b67ba7a7
commit
929af64a67
Notes:
sideshowbarker
2024-07-18 03:59:35 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/929af64a676 Pull-request: https://github.com/SerenityOS/serenity/pull/10022
1 changed files with 2 additions and 2 deletions
4
AK/URL.h
4
AK/URL.h
|
@ -46,7 +46,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool const& is_valid() const { return m_valid; }
|
||||
bool is_valid() const { return m_valid; }
|
||||
|
||||
String const& scheme() const { return m_scheme; }
|
||||
String const& protocol() const { return m_scheme; }
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
String const& query() const { return m_query; }
|
||||
String const& fragment() const { return m_fragment; }
|
||||
u16 port() const { return m_port ? m_port : default_port_for_scheme(m_scheme); }
|
||||
bool const& cannot_be_a_base_url() const { return m_cannot_be_a_base_url; }
|
||||
bool cannot_be_a_base_url() const { return m_cannot_be_a_base_url; }
|
||||
|
||||
bool includes_credentials() const { return !m_username.is_empty() || !m_password.is_empty(); }
|
||||
bool is_special() const { return is_special_scheme(m_scheme); }
|
||||
|
|
Loading…
Add table
Reference in a new issue