diff options
author | Max Wipfli <mail@maxwipfli.ch> | 2021-06-01 11:14:30 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-01 12:23:16 +0200 |
commit | 2e23954271a57324a57cceb61da91675eeae9643 (patch) | |
tree | 455b5080822cd2e7c2f82c46881f027adb585580 /AK/URL.cpp | |
parent | 33396494f66d0c292b8625575d784dfb44792c1b (diff) | |
download | serenity-2e23954271a57324a57cceb61da91675eeae9643.zip |
AK: Move identity check from URL::operator==() to equals()
Diffstat (limited to 'AK/URL.cpp')
-rw-r--r-- | AK/URL.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/AK/URL.cpp b/AK/URL.cpp index 5e3ad55f9f..c613e4f12e 100644 --- a/AK/URL.cpp +++ b/AK/URL.cpp @@ -327,6 +327,8 @@ String URL::serialize_for_display() const bool URL::equals(URL const& other, ExcludeFragment exclude_fragments) const { + if (this == &other) + return true; if (!m_valid || !other.m_valid) return false; return serialize(exclude_fragments) == other.serialize(exclude_fragments); |