From 929af64a67669c023be68aeda7770f702ed36913 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Mon, 13 Sep 2021 22:42:48 +0300 Subject: [PATCH] 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). --- AK/URL.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AK/URL.h b/AK/URL.h index 895d292c03..5d3bf1a6fe 100644 --- a/AK/URL.h +++ b/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); }